make_ratemat | R Documentation |
Defines rates (per day) of flow from compartment i
(row) to compartment j
(column).
make_ratemat(
state,
params,
do_ICU = TRUE,
sparse = FALSE,
symbols = FALSE,
indices = FALSE
)
state |
named vector of states |
params |
named vector of parameters |
do_ICU |
include additional health utilization compartments |
sparse |
return sparse matrix? |
symbols |
return character (symbol) form? (FIXME: call adjust_symbols here rather than in show_ratemat()?) |
indices |
return indices for lower-level stuff? |
The rates are as follows:
S to E: - (\beta_0 / N) S (C_a I_a + C_p I_p + (1-iso_m)C_m I_m + (1-iso_s)C_s I_s)
E to I_a:
E to I_p:
...
See read_params
for parameter definitions.
matrix of (daily) transition rates
Base version matches structure of Stanford/Georgia models
flow diagram: see http://covid-measures.stanford.edu/ 'model details' tab
or ../pix/model_schematic.png
parameter definitions: see params_CI_base.csv
, params_ICU_diffs.csv
Other classic_macpan:
add_d_log()
,
add_updated_vaxrate()
,
aggregate_agecats()
,
calibrate_comb()
,
calibrate()
,
check_age_cat_compatibility()
,
check_contact_rate_setting()
,
col_multiply()
,
condense_age()
,
condense_params_vax()
,
condense_state()
,
condense_vax()
,
dev_is_tikz()
,
do_step()
,
expand_params_age()
,
expand_params_desc_age()
,
expand_params_desc_variant()
,
expand_params_desc_vax()
,
expand_params_mistry()
,
expand_params_variant()
,
expand_params_vax()
,
expand_state_age()
,
expand_state_vax()
,
expand_stateval_testing()
,
fix_pars()
,
fix_stored()
,
forecast_ensemble()
,
forecast_sim()
,
getData()
,
get_GI_moments()
,
get_Gbar()
,
get_R0()
,
get_doses_per_day()
,
get_evec()
,
get_kernel_moments()
,
get_opt_pars()
,
get_r()
,
invlink_trans()
,
make_betavec()
,
make_beta()
,
make_jac()
,
make_state()
,
make_test_wtsvec()
,
make_vaxrate()
,
mk_Nvec()
,
mk_agecats()
,
mk_contact_rate_setting()
,
mk_mistry_Nvec()
,
mk_pmat()
,
mk_vaxcats()
,
mle_fun()
,
non_expanded_states
,
rExp()
,
read_params()
,
repair_names_age()
,
restore()
,
run_sim_ageify()
,
run_sim_break()
,
run_sim_loglin()
,
run_sim_mobility()
,
run_sim_range()
,
run_sim()
,
show_ratemat()
,
testify()
,
texify()
,
trans_state_vars()
,
update_contact_rate_setting()
,
update_foi()
,
update_params_mistry()
,
vis_model()
,
write_params()
params <- read_params("ICU1.csv")
state <- make_state(params[["N"]],E0=params[["E0"]], use_eigvec=FALSE)
M <- make_ratemat(state,params)
if (require(Matrix)) {
image(Matrix(M))
}
make_ratemat(state,params,symbols=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.