Code repository with the aim of having an estimate of the evolution of the COVID-19 outbreak in the Spanish regions.
The code is developed entirely in R. The drake
package is used to
manage the workflow. This analysis can be run by cloning the repository
and running the make.R
file.
This analysis is developed by a layman and has the sole objective of having a minimum idea of the potential evolution of the outbreak in Spain. Under no circumstances this is intended to be a reliable study with which to take any health decision. If you want to figure out how experts are modelling this, I strongly recommend taking a look at the excellent work that the London School of Hygiene and Tropical Medicine is doing.
The analysis focuses on the estimation of the basic reproduction
number for the
Spanish regions based on the confirmed cases by region. The
EpiEstim
package is used for this purporse. In particular, this
package
has a method (uncertain_si
) in order to account for uncertainty on the
serial interval distribution. Why was this method chosen?
- It’s a new virus so a lot of research will be done in the coming months. There’s no absolute evidence about the serial interval distribution.
- Although many epidemiological models for viruses with similar behaviour are modelled with a serial interval under a Gamma or Weibull distributions, this doesn’t seem to be entirely clear in this case.
- It’s true, as discussed in the article linked in point 2, that the
virus can have a normally distributed serial interval and therefore
not restricted to positive values. In this case,
EpiEstim
doesn’t consider distributions with real domain for the time being, so in this analysis the following normal distribution is considered:
To run the analysis, a Docker image is provided that reproduces the results using the most updated information from the Instituto de Salud Carlos III.
Note: Depending on your configuration you might need to run the
following commands with root privileges (with sudo
).
First install docker and clone this repository:
git clone https://github.com/jlopezper/basic-reproduction-number-covid19.git
Navigate to the cloned repository on your own machine, and launch the container:
cd /path/to/repo
docker-compose up -d
Enter the container and run the make.R
file:
docker exec -it basic-reproduction-number-covid19_analysis_1 bash
Rscript make.R
When the process ends, exit the container:
exit
docker-compose down
Finally, you will find the results within the plots
directory!