R code for running SEIR model for the city of Austin.
The model is an SEIR-style compartmental model with 9 states by 5 age groups and 2 risk groups for a total of 90 states.
Two input files are used:
- Hospital data with admission, recoveries and deaths.
- Mobility data with 7 variables
- ICU data file for dashboard (not used in main model)
Main run file is run-seir.R
Run occurs in 3 stages:
- Fit model parameters using POMP mf2 algorithm.
- Smoothing stage: select possible paths for states of the model with probability proportional to calculated likelihood based on full time series.
- For each of the paths attach a future path.
First argment can be a modifier, or missing.
Allowed modifiers are help
, history
, continue
, short
Rscript run-seir.R Admit_discharge_datafile.xlsx ICY_datafile.xlsx
Rscript run-seir.R continue Rdata_session_file.Rda
stage of run to continue is determined by name of file before/after stage.
Rscript run-seir.R continue Rdata_session_file.Rda after:stage
continue run after stage. Possible stages: prepare, mf2, smooth, sim, analysis.
Rscript run-seir.R history Admit_discharge_datafile.xlsx [ndays]
Load Admit_discharge_datafile.xlsx data file, but cut to first [ndays].
Rscript run-seir.R short Admit_discharge_datafile.xlsx ICY_datafile.xlsx
Don't start run from beginning of hospitalization data, but instead load initial state from a previous run for a later date.
That run has to be carefully prepared top have enough initial variation and started at a relatively quiet part of the epidemic.
The start session is currently hard coded.
Short runs were not used for the PNAS paper analysis.
Additional aguments come in the form of keyword:argument
no:dash
don't produce dashboard csv files
no:pdf
don't produce pdf report
no:mob
run without mobility data
name.add:string
add string to output file name