Reputation: 61
I want to study the impact of heat waves (0 for non-heat wave days, 1 for heat wave days) on mortality during the warm period over a 20-year span. The code I use to create the crossbasis function using the dlnm package in R is:
cb <- crossbasis(data_warm$HW_1, lag = max_lag, argvar = list(fun = "lin"), # Linear function for exposure arglag = list(fun = "ns", knots = logknots(max_lag, nk=2)), group=data_warm$year) # Natural cubic spline with 2 internal knots
Do you have any suggestions on how the crosspred function should be implemented and how to create plots depicting the cumulative excess risk of mortality for heat waves over a 10-day lag period??
Upvotes: 0
Views: 33