Data and code from: Modeling the SARS-CoV-2 epidemic and the efficacy of different vaccines across different network structures
Data files
May 20, 2026 version files 5.69 MB
-
ANOVA.r
498 B
-
Hartvigsen-Dimitroff_COVID_model.R
13.76 KB
-
make_fig_10.r
1.74 KB
-
make_fig_11.r
1.82 KB
-
make_fig_12.r
1.76 KB
-
make_fig_2.r
2.11 KB
-
make_fig_3_-_SWN_degree_distributions.r
3.39 KB
-
make_fig_4.R
1.32 KB
-
make_fig_7.r
5.16 KB
-
make_fig_8.r
875 B
-
make_fig_9.r
1.78 KB
-
README.md
2.97 KB
-
ReadMe.txt
3.04 KB
-
summary1.2.csv
5.63 MB
-
Vacc-Evol-fun1.2.R
16.40 KB
Abstract
We developed a network-based SEIRV model to test different vaccine efficacies on SARS-CoV-2 (Betacoronavirus pandemicum) dynamics in a naive population of 25,000 susceptible adults. Different vaccine efficacies, derived from data, were administered at different rates across a range of different Watts-Strogatz network structures. The model suggests that differences among vaccines were of minor importance compared to vaccination rates and network structure. Additionally, we tested the effect of strain differences in transmissibility (R0 values of 2.5 and 5.0) and found that this was the most important factor influencing the number of individuals ultimately infected. However, network structure was most important in affecting the maximum number of individuals that were infectious during the epidemic peak. The interaction of network structure, vaccination effort, and difference in strain transmissibility was highly significant for all epidemic metrics. The model suggests that differences in vaccine efficacy are not as important as vaccination rate in reducing epidemic sizes. Further, the importance of the evolution of viral transmission rates and our ability to develop effective vaccines to combat these strains will be of primary concern for our ability to control future disease epidemics.
Dataset DOI: 10.5061/dryad.98sf7m0vh
Description of the data and file structure
The program is written in the R programming language. There are two files. The main file, which contains parameter settings, is
To run the model use the R programming environment. Open the main model file: Hartvigsen-Dimitroff_COVID_model.R
The functions are stored in a separate file: Vacc-Evol-fun1.2.R
To run the model the two files should be in the same folder and the working directory should be set to where these files are located.
Note that the model was run using the small-world network of Watts-Strogatz (1998) with different degrees of rewiring (see the paper for more details).
The model was run using different random seeds simultaneously on a computer with 20 cores. The output files from each run were then merged.
Model data structure
The code requires the R statistical and programming application to run. The model keeps track of all individuals (inds) in a list structure with four dataframes. The structure is set up as follows:
inds:
states:
state (current state of ind: S, E, I, R, or V)
dayS, dayE, dayI, dayR (days this individual became SEI or R)
strains:
S1 (this is the infected strain)
daysV: (this records when an individual received each of the two vaccines)
dayV1 (day the individual got vaccine #1)
dayV2 (day the individual got vaccine #2)
strainsV (vaccination strains recieved)
V1 (vaccine #1)
V2 (vaccine #2)
This "inds" list is passed to and from functions, getting continuously updated.
Data Files and R script files that make the graphs.
ANOVA Table 2. Use file "ANOVA.r" which requires "summary1.2.csv".
Figure 2: The figure is made using the file "make_fig_2.r" which requires the data file: "summary.data.rewirep.csv".
Figure 3: The figure is made using the file "make_fig_3_-_SWN_degree_distributions.r"
Figure 4: The figure is made using the file "make_fig_4.R".
Figure 5: Completed using model file "Hartvigsen-Dimitroff_COVID_model.R".
Figure 6: Completed using model file "Hartvigsen-Dimitroff_COVID_model.R".
Figure 7: The figure is made using the file "make_fig_7.r" which requires the data file: "summary1.2.csv".
Figure 8: The figure is made using the file "make_fig_8.r" which requires the data file: "summary1.2.csv".
Figure 9: The figure is made using the file "make_fig_9.r" which requires the data file: "summary1.2.csv".
Figure 10: The figure is made using the file "make_fig_10.r" which requires the data file: "summary1.2.csv".
Figure 11: The figure is made using the file "make_fig_11.r" which requires the data file: "summary1.2.csv".
Figure 12: The figure is made using the file "make_fig_12.r" which requires the data file: "summary1.2.csv".
The readme text is called ReadMe.txt
The data for this submission includes R script files and a data file that is generated by running the model file (Hartvigsen-Dimitroff COVID model.R), which depends of a function file (Vacc-Evol-fun1.2.R). The remaining R script files are labeled for the paper figures they create, which depend on the two CSV data files. Additionally, there is an ANOVA.r script file which runs the analysis of variance.
