Code and data for 'Age-specific transmission dynamics of SARS-CoV-2 during the first two years of the pandemic'

DOI

This is the main code for the paper "Age-specific transmission dynamics of SARS-CoV-2 during the first two years of the pandemic" by Otilia Boldea, Amir Alipoor, Sen Pei, Jeffrey Shaman, and Ganna Rozhnova and its Supplement.

For questions related to the code, please email Otilia Boldea via the button "Contact Owner" top right or https://sites.google.com/site/otiliaboldea/home

The code is organized as follows:

Main Code/ Code with synthetic train data

synthetic_mobility.m is the code to generate the synthetic mobility Msynth.mat; the true data, used to generate the results in the paper (output.m) is property of the national railway company National Spoorwegen, and is confidential all the other data is publicly available or posted by us with permission from RIVM (Royal Institute for Public Health and Environment). The folder Data contains all this data. The code for construction of the data along with plots and Tables can be found in Supplementary Materials Code/Code for S figures and Tables. The description of how this data is constructed in available in the Supplementary Materials of the above paper

To run the code with synthetic mobility data:

run inference.m, which uses the following functions: SEIRHS.m - runs the stochastic version of the epidemiology model and an RK4 integration transf.m - calculates the time-varying transition function of contacts multiplied by the susceptibility parameter waning - calculates the waning of protection parameters in the second compartment set initialize - initializes the parameters and the unobserved states checkbound_ini - checks initial bounds on unobserved states (for example, S cannot be negative or larger than population) checkbound - checks bounds on unobserved states - after updating (for example, S cannot be negative or larger than population) Inflation.m - performs variance inflation of posterior updates to prevent the filter from collapsing due to lack of variance liki.m - calculates the marginal posterior (quasi-)likelihood of the model based on the ensemble adjustment Kalman filter the dataset movNSperc.mat (generated for Figures S11 and S19) contains percentage change in National train mobility compared to pre-pandemic levels and is used by the function synthetic_mobility.m (note that instead, Google mobility data could be used, but priors on parameters theta would likely need adjustment) the dataset CBSprov.mat contains in column 4 the number of people living in province i and working in j, and is downloaded from CBS (Central Bureau Statistics) https://www.cbs.nl/nl-nl/cijfers/detail/83628NED#shortTableDescription
use year 2018, first published in 2020.

Main Code/ Output files

contains output.m, main output in the paper output_synth.m, output with synthetic train mobility data

Main Code/ Code for Main Text Figures

contains code for reproducing Figures in the main text Supplementary Materials Code

contains two folders. The folder "Code for S Figures and Tables" contains code for constructing all the data used in the main code, as well as code for reproducing the Tables and Figures in the Supplementary Materials of the paper, labeled "S" The folder "Code for A Figures and Tables" contains code for reproducing the figures and tables in the Supplementary Materials labeled "A"

Main Text Figures

contains all the figures in the main text of the paper

Supplementary Figures

contains all the figures in the Supplement

Universe: Covering the entire Dutch population Country / Nation: the Netherlands.

Data files: The number of files is too large to fill this in as it includes both data creation, modelling and outputs of the paper and the supplement. Readme files are available in each subfolder.

Structure data package: Data is structured in the following subfolders: Main code (for results, figures and tables in the paper), Main Text Figures, Supplementary Figures, Supplementary Materials code, and an overall readme file explaining the structure further.

The files are large due to two output files that are large.

https://github.com/oboldea/COVID_age_regions

The datasets used as input in this study are listed in Table 1 of the related publication. All input datasets except for regional train mobility data are in this dataset. Requests for regional train mobility data to the Dutch Railways (Nederlandse Spoorwegen—NS).

Identifier
DOI https://doi.org/10.34894/J5UHNL
Related Identifier IsCitedBy https://doi.org/10.1093/pnasnexus/pgae024
Metadata Access https://dataverse.nl/oai?verb=GetRecord&metadataPrefix=oai_datacite&identifier=doi:10.34894/J5UHNL
Provenance
Creator Boldea, Otilia (ORCID: 0000-0002-6135-430X); Alipoor, A.; Rozhnova, G.
Publisher DataverseNL
Contributor Boldea, Otilia; Tilburg University; DataverseNL
Publication Year 2024
Rights CC0 1.0; info:eu-repo/semantics/openAccess; http://creativecommons.org/publicdomain/zero/1.0
OpenAccess true
Contact Boldea, Otilia (Tilburg University)
Representation
Resource Type Daily longitudinal data; Dataset
Format application/matlab-mat; text/x-matlab; application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; text/plain; text/csv; application/vnd.ms-excel; application/postscript; application/x-stata-syntax; application/x-stata-14
Size 995; 1009; 1346; 13216; 1032; 2615; 3498; 144583; 165039; 1397; 410; 176523; 537134816; 88671; 84734; 3194; 88064; 72192; 70656; 10413; 388; 2303; 8881; 288903; 184669; 182513; 182387; 9281; 220915; 106706; 106728; 107517; 10908; 167832; 102487; 74803; 16425; 109509; 97441; 11610; 2003206; 566082; 8912; 105374; 105138; 106104; 105534; 103317; 104240; 103445; 105060; 104197; 104278; 104721; 104824; 104460; 103981; 105016; 103555; 101582; 102662; 102007; 104078; 104207; 102327; 104568; 103736; 102837; 103835; 104715; 104625; 24874; 23937; 23793; 24245; 24813; 23967; 24603; 24642; 23915; 23776; 24301; 24605; 22983; 22671; 22934; 22638; 22718; 23423; 22976; 22996; 22999; 23177; 22694; 22971; 22413; 22697; 22477; 22247; 21938; 22336; 22367; 22966; 22689; 22486; 22709; 22463; 227622; 21913; 22628; 21943; 22397; 21891; 22736; 22184; 22601; 22371; 21864; 22586; 22650; 190164; 191121; 182993; 38616; 295208; 91956; 206905; 207574; 206314; 208421; 207720; 209477; 209392; 209478; 210278; 207347; 209637; 209180; 105119; 104808; 105913; 105612; 105437; 105378; 106022; 106445; 26559; 52712; 322998; 214858; 113834; 39867; 33637; 59093; 59864; 11425763; 293358; 286041; 281452; 236218; 68840; 179042; 178910; 177939; 179063; 179660; 179990; 179659; 179648; 181347; 178429; 180009; 179854; 192898; 67039; 65832; 66505; 8735; 6387; 6868; 1206; 4464; 8006; 3478; 3539; 2403; 5094; 2751; 12078; 1154; 219; 246; 4049; 15764; 3889; 43308; 2759950; 824; 314; 241; 815; 51628; 4509; 268; 808; 298; 29684; 2662400; 36916; 7438; 4418; 3888490; 1794725; 34998891; 1001; 5868; 5311; 932; 472148; 235; 4241; 1741999787; 1666377308; 10250; 544; 257; 3973; 321; 152521; 151804; 14856; 328; 486; 4172; 327; 135; 352; 1183; 484; 179; 9282; 43679; 33059; 53647; 369; 33748; 26112; 2520; 3081; 861; 4451; 2998; 4349; 4136; 12038; 3674; 3207; 1022; 6458; 3196; 6077; 1701; 7664; 15993; 247719; 5637; 888; 15737; 6656; 27136; 1344; 4472; 5470; 6070
Version 1.1
Discipline Agriculture, Forestry, Horticulture, Aquaculture; Agriculture, Forestry, Horticulture, Aquaculture and Veterinary Medicine; Life Sciences; Medicine; Social Sciences; Social and Behavioural Sciences; Soil Sciences