The goal of school.epi.abm is to implement an agent-based model of COVID infection and mitigation dynamics in K-6 schools, as described in https://doi.org/10.3389/fpubh.2023.856940.
You can install the development version of school.epi.abm like so:
# install.packages("devtools") # if not already installed
devtools::install_github("UCLA-PHP/school.epi.abm")
After instalation, you can load the package with the library()
function:
library(school.epi.abm)
The graphical user interface (GUI) for the model can be run using the following command:
shiny::runApp()
The GUI is also deployed at https://agent-based-models.shinyapps.io/RegionalCOVIDSchoolSimulation/.
The model can also be run directly from the R command line using the following commands:
library(school.epi.abm)
simulation_outputs = run_simulation(
n_schools = 10,
verbose = TRUE)
We can summarize and visualize the results as follows:
average_class_data_by_day = summarize_records(simulation_outputs$class_records)
plot1a = plot1_plotly(
class_records,
plot3_ymax = 6)
print(plot1a)
analyze_results(simulation_outputs)
The subfolder inst/extdata
contains the analysis script
ABM results loop.R
, which can be used to loop over a table of input
conditions (specified in that script as the tibble
conditions_to_cross
) and reproduce the tables in the corresponding
article (https://doi.org/10.3389/fpubh.2023.856940).