Code for the manuscript: "Considering questions before methods in dementia research with competing events and causal goals"
-
Paper on press at the American Journal of Epidemiology, please send an email if you want the accepted version of the manuscript, pre-print prior to peer-review is available in MedRxiv: https://doi.org/10.1101/2021.06.01.21258142
-
Data availability: Rotterdam Study can be obtained via requests directed toward the management team of the Rotterdam Study (secretariat.epi{at}erasmusmc.nl), which has a protocol for approving data requests. Because of restrictions based on privacy regulations and informed consent of the participants, data cannot be made freely available in a public repository.
-
Code for the total effect is available in
02_R/03_total_effect.R
, which requires auxiliary functions available in02_R/03b_auxiliary_functions.R
-
Code for the controlled direct effect is available in
02_R/04_cde.R
, which requires auxiliary functions available in02_R/04b_auxiliary_fx.R
-
Figure 2 was created using the output of previous
.R
files, and code is available in03_figs/plots.R
- For a tutorial-like R code check: https://github.com/palolili23/2022_ser_competing_events.