Supporting materials for Nishiura H, Linton NM, Akhmetzhanov AR 2020 "Serial interval of novel coronavirus (COVID-19) infections" International journal of infectious diseases 93: 284–6 (doi:10.1016/j.ijid.2020.02.060)
I. (certain pairs) Inference of the serial interval using only infector-infectee pairs identified from the literature with high certainty
- A1. Stan simulations.ipynb Code to run MCMC simulations in cmdStan
- A2. Processing the traces.ipynb Python script to analyse posterior distirubions generated by Stan
- If needed, the full output from Stan can be found in the shared Dropbox folder (size: 1.2Gb)
Without truncation
With right truncation
II. (certain and probable pairs) Inference of the serial interval using only infector-infectee pairs identified as certain or probable
- B1. Stan simulations including probable cases.ipynb Code to run MCMC simulations in cmdStan
- B2. Processing the traces for certain and probable cases.ipynb Python script to analyse posterior distirubions generated by Stan
- If needed, the full output from Stan can be found in the shared Dropbox folder (size: 2.0Gb)
Without truncation
With right truncation
Lognormal distribution as the best-fit model for certain and probable pairs with right truncation
Correlation between param1 (meanlog) and param2 (sdlog)
(complimentary) Initial analysis of six pairs from [Li et al 2020 NEJM]
We have also added our very initial analysis of six pairs from Li et al 2020 NEJM paper. Differently from the authors who implemented informative priors on the parameters as it was from SARS-CoV-1, we used weekly informative (standard) priors.
- D1. Stan simulations for Li et al 2020 NEJM.ipynb Code to run MCMC simulations in cmdStan
- D2. Processing the traces for Li et al 2020 NEJM.ipynb Python script to analyse posterior distirubions generated by Stan.
The result of Li et al with informative prior was the gamma distribution with the mean 7.5 days (95% CI: 5.3, 19).
- The folder data contains the supplementary table used for our analysis.
- The folder results contains all constructed traceplots, as well as individual traces for the parameters of the distributions. As such, param1 & param2 in csv or pickle files are respectively the meanlog and sdlog for the lognormal distribution, the shape and inverse scale for the gamma distribution, and the shape and scale for the Weibull distribution. We followed the notation according to Stan manual (see the pages on lognormal, gamma, and Weibull distributions). The
scipy.stats
notation for each distribution follows the code:ss.lognorm(param2,scale=np.exp(param1))
,ss.gamma(param1,scale=1/param2)
, andss.weibull_min(param1,scale=param2)
, respectively. Heress
andnp
are shortcuts forscipy.stats
andnumpy
libraries in Python. - Andrei R. Akhmetzhanov is grateful to Chris Wymant (University of Oxford, U.K.) for helpful exchange of emails regarding the statistical inference procedure and for pointing out that Li et al adopted an informative SARS prior in their work.
Thank you for your interest to our work!
Few words of caution: We would like to note that our code is not supposed to work out of box, because the links used in the notebooks were user-specific, and our main intent was to show the relevance of the methods used in our paper.