These are the scripts for the article:
Velek, P., Luik, A.I., Brusselle, G.G.O. et al. Sex-specific patterns and lifetime risk of multimorbidity in the general population: a 23-year prospective cohort study. BMC Med 20, 304 (2022). https://doi.org/10.1186/s12916-022-02487-x
It contains the data cleaning and data analysis scripts used in the paper and the figures included in the paper. NB: the scripts rely on data that are not part of the repository due to ethical and legal restrictions.
All R code is in the “Script” folder, figures inncluded in the paper are stored in the “Figures” folder (including files to run locally the interactive versions of figures 1 and 2).
The script files have to be run in sequence (indicated by the numbers at the begining of the file names), as most code relies on outcomes generated in previous steps.
Contact Premysl Velek ([email protected]) for further information.