R/kfuns.R
rExp.Rd
run a pure-exponential sim; uses run_sim_range with a population of 1 (proportions) and a very small starting value, run for 100 steps (by default) used to calculate either r (technically r0) or eigenvector (for distributing initial exposed across states)
parameters
number of steps to run
sub-time steps
run with hazard
initial state as created by make_state. Leave as NULL to create state from params (??)
testing compartments
return growth rate or eigenvector?
model type (passed to make_state
)
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_ratemat()
,
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
,
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()
pp <- read_params("PHAC_testify.csv")
rExp(pp)
#> Warning: CHECK: may not be working properly for testify?
#> Warning: the exponential simulation has not converged: please iterate for more steps.
#> [1] 0.2614623
rExp(pp,return_val="eigenvector")
#> Warning: CHECK: may not be working properly for testify?
#> S_u S_p S_n S_t E_u E_p
#> 1.896206e-07 0.000000e+00 1.516964e-10 0.000000e+00 5.836112e-01 1.340307e-04
#> E_n E_t Ia_u Ia_p Ia_n Ia_t
#> 3.328891e-04 5.396956e-05 1.496804e-01 6.441082e-05 5.535675e-05 4.879847e-05
#> Ip_u Ip_p Ip_n Ip_t Im_u Im_p
#> 9.370669e-02 3.105751e-05 4.391633e-05 1.541096e-05 1.613725e-01 4.889444e-04
#> Im_n Im_t Is_u Is_p Is_n Is_t
#> 4.922923e-05 2.919833e-04 6.947143e-03 2.024226e-05 2.168249e-06 1.141896e-05
#> H_u H_p H_n H_t H2_u H2_p
#> 2.568763e-07 1.386182e-03 4.313795e-07 8.330210e-04 1.049726e-08 2.280085e-05
#> H2_n H2_t ICUs_u ICUs_p ICUs_n ICUs_t
#> 7.095606e-09 3.407923e-05 7.365822e-08 3.501440e-04 1.089647e-07 2.389421e-04
#> ICUd_u ICUd_p ICUd_n ICUd_t
#> 1.918730e-08 1.097061e-04 3.414049e-08 6.221567e-05
rExp(pp,return_val="eigenvector",testify=TRUE)
#> Warning: CHECK: may not be working properly for testify?
#> S_u S_p S_n S_t E_u E_p
#> 1.896206e-07 0.000000e+00 1.516964e-10 0.000000e+00 5.836112e-01 1.340307e-04
#> E_n E_t Ia_u Ia_p Ia_n Ia_t
#> 3.328891e-04 5.396956e-05 1.496804e-01 6.441082e-05 5.535675e-05 4.879847e-05
#> Ip_u Ip_p Ip_n Ip_t Im_u Im_p
#> 9.370669e-02 3.105751e-05 4.391633e-05 1.541096e-05 1.613725e-01 4.889444e-04
#> Im_n Im_t Is_u Is_p Is_n Is_t
#> 4.922923e-05 2.919833e-04 6.947143e-03 2.024226e-05 2.168249e-06 1.141896e-05
#> H_u H_p H_n H_t H2_u H2_p
#> 2.568763e-07 1.386182e-03 4.313795e-07 8.330210e-04 1.049726e-08 2.280085e-05
#> H2_n H2_t ICUs_u ICUs_p ICUs_n ICUs_t
#> 7.095606e-09 3.407923e-05 7.365822e-08 3.501440e-04 1.089647e-07 2.389421e-04
#> ICUd_u ICUd_p ICUd_n ICUd_t
#> 1.918730e-08 1.097061e-04 3.414049e-08 6.221567e-05