retrieve parameters from a CSV file

make_state(
  N = params[["N"]],
  E0 = params[["E0"]],
  type = "ICU1h",
  state_names = NULL,
  use_eigvec = NULL,
  params = NULL,
  x = NULL,
  normalize = FALSE,
  ageify = NULL,
  vaxify = NULL,
  testify = NULL
)

Arguments

N

population size

E0

initial number exposed

type

(character) specify what model type this is intended for (e.g., "ICU1", "CI"); determines state names

state_names

vector of state names, must include S and E

use_eigvec

use dominant eigenvector to distribute non-Susc values to zero: default is to set this to TRUE if params is non-NULL

params

parameter vector (looked in for N and E0)

x

proposed (named) state vector; missing values will be set

normalize

(logical) should the state vector be normalized to sum to 1?

ageify

expand state vector to include different age groups (??)

vaxify

expand state vector to include groups that have 1-2 vaccine doses (??)

testify

expand state vector to include testing compartments (untested, neg waiting, pos waiting, pos received) ?

Details

The parameters that must be set are:

\( N: \) population size

\( \beta_0: \) transmission rate

\( 1/\sigma: \) mean latent period

\( 1/\gamma_a: \) mean infectious period for asymptomatic individuals

\( ... \)

generate initial state vector

Note

"CI" refers to the Stanford group's "covid intervention" model.

Examples

p <- read_params("ICU1.csv")
make_state(N=1e6,E0=1)
#>      S      E     Ia     Ip     Im     Is      H     H2   ICUs   ICUd      D 
#> 999999      1      0      0      0      0      0      0      0      0      0 
#>      R      X      V 
#>      0      0      0 
#> attr(,"epi_cat")
#>  [1] "S"    "E"    "Ia"   "Ip"   "Im"   "Is"   "H"    "H2"   "ICUs" "ICUd"
#> [11] "D"    "R"    "X"    "V"   
#> attr(,"class")
#> [1] "state_pansim"
make_state(params=p)
#>      S      E     Ia     Ip     Im     Is      H     H2   ICUs   ICUd      D 
#> 999995      3      1      0      1      0      0      0      0      0      0 
#>      R      X      V 
#>      0      0      0 
#> attr(,"epi_cat")
#>  [1] "S"    "E"    "Ia"   "Ip"   "Im"   "Is"   "H"    "H2"   "ICUs" "ICUd"
#> [11] "D"    "R"    "X"    "V"   
#> attr(,"class")
#> [1] "state_pansim"