A novel self-matched design for epidemiological investigations of transient health risks associated with time-varying exposures
This repository stores tutorials, updated R code, and data for case studies and simulations presented in the article:
Gasparrini A. The case time series design. Epidemiology. 2021;32(6)829-837. DOI: 10.1097/EDE.0000000000001410. PMID: 34432723 [freely available here]
The three folders refer to material originally presented as online appendices of the article. Specifically:
- CTSclinepi provides a tutorial that illustrates the first case study presented in the article, with an application of the case time series design in clinincal epidemiology.
- CTSenvepi provides a tutorial that illustrates the second case study presented in the article, with an application of the case time series design in environmental epidemiology.
- SimulationStudy includes the material for the simulation study, where the new study design is evaluated under different scenarios of increasingly complex data settings.
The folders contain the main documents together with the related R code to replicate the results of the two case studies and the simulation study presented in the article. The code of the case studies creates and uses simulated data to reproduce the features of the original datasets, which cannot be made publicly available, and the steps to reproduce the (approximate) results. The Rmd file to create the tutorial documents is also included. The code for the simulation study replicates the results exactly.