This model simulates the transmission of COVID-19 to an employee or their household, transmission within the household, the health outcomes experienced by members of the household, and the effects of those outcomes on the employee's absenteeism.
- Download R
- Install packages in R:
install.packages(c("tidyverse", "lubridate", "zoo"))
- Ensure the input employee data is in the right place (see below)
- Run
make
- Interpret the output file
results/results.tsv
- Make adjustments to
run_employees.R
, such as increasing the number of iterations (n_iter
) or the epidemiological parameters (base_pars
).
The scripts expect a file employees.tsv
in this folder. This file should be tab-separated, with at least the following 4 columns:
state
: 2-letter abbreviationssex
: eitherM
orF
age
: an integer between 1 and 100n_dependents
(number of dependents): a nonnegative integer
model.R
: Main modeling functionsrun_employees.R
: Runs simulations and stores the resultsanalyze.R
: Loads stored results and produces plots and tablesscrape_state_data.R
: Script to scrape incidences by statecompute_risks_by_age.R
: Derives certain risk ratios by agegenerate_fake_data.R
: Generates fake employee data for debuggingutils.R
: Utility functions shared across scriptsMakefile
: Automated model running usingmake
cache/
: Stored simulation resultsresults/
: Output tables