Examples reproducing the results published in the article:
Gasparrini A, Leone M. Attributable risk from distributed lag models. BMC Medical Research Methodology. 2014;14(1):55. [freely available here]
This methodological article describes how to compute attributable risk measures from distributed lag linear and non-linear models, using functions in the R package dlnm and the additional attrdl()
function.
The code:
- london.csv stores the dataset used in the illustrative examples
- the numbered files from 01.runmodel.R to 02.graphs.R reproduce the results of the illustrative example
- attrdl.R creates the function for computing the attributable risk measures
- attrdl.Rd is the R documentation file to produce the help page attrdl.pdf for the function
attrdl()
Download as a ZIP file using the green button Clone or download above