Analysis for TransVIR Sars-CoV-2 Incidence Paper
The directory contains the code required to perform analyses:
- 📁 scripts: R scripts to be run in number order.
The raw and modified data required to replicate analyses is available upon request.
This analysis requires R software and RStudio Desktop to be pre-installed.
- Clone this repository
- Open RStudio and create new project associated with this directory See here for details.
- Open each script in
./scripts
and run in number order
##To replicate incidence based analyses (i.e. Anderson-Gill Modelling)
- Run 01_Data_cleaning.R
- Import code to produce PCR negative dates (02_PCR_negative_dates.R)
- Identify all infection episodes (incidence_data_base.R) - this is the default PCR neg definition
- Convert into a lexis format 04_lexis_code
- Run Anderson Gill Modelling 05_AG_Results
To run sensitivity analyses, repeat steps 3-5 with difference incidence_data_XX versions of the code 6. Summaryresults_sensitivity.R provides overall numbers for each scenario.
##To replicate symptom results
- Run 01_Data_cleaning.R
- Import code to produce PCR negative dates (02_PCR_negative_dates.R)
- Identify all infection episodes (incidence_data_base.R) - this is the default PCR neg definition
- Convert into a lexis format 04_lexis_code
- Run symptom analysis - 05_symptomcode_V3.R
- Produce summary description of symptoms - 06_symptom_summarycode.R
#To replicate cluster analysis
- Run 01_data_cleaning.R
- Run 02_cluster_code_final.R to produce cluster data sets for analysis
- Run either 03_HCIR_analysis.R or 03_SAR_analysis.R for HCIR and SAR analyses respectively.