adjust pars to match targets
a parameter vector
target values for one or more epidemic moments
list of sets of parameters to adjust
method for fixing r (brute-force exponential simulation or JD's kernel-based approach?)
interval for uniroot adjustment
debug?
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_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
,
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()
pp <- read_params("ICU1.csv")
summary(pp)
#> r0 R0 Gbar CFR_gen dbl_time
#> 0.2278149 6.5180089 12.1897402 0.0352000 3.0425898
pp2 <- fix_pars(pp,debug=TRUE)
#> Nelder-Mead direct search function minimizer
#> function value for initial parameters = 38.312888
#> Scaled convergence tolerance is 5.70907e-07
#> Stepsize computed as 0.100000
#> BUILD 3 38.313104 25.347254
#> LO-REDUCTION 5 38.312888 25.347254
#> EXTENSION 7 25.347486 9.272902
#> EXTENSION 9 25.347254 4.799472
#> REFLECTION 11 9.272902 0.519104
#> REFLECTION 13 4.799472 0.007931
#> LO-REDUCTION 15 0.519104 0.007931
#> HI-REDUCTION 17 0.118932 0.007931
#> HI-REDUCTION 19 0.078348 0.007680
#> LO-REDUCTION 21 0.017933 0.007680
#> HI-REDUCTION 23 0.007931 0.004501
#> HI-REDUCTION 25 0.007680 0.000039
#> LO-REDUCTION 27 0.004501 0.000018
#> HI-REDUCTION 29 0.001087 0.000018
#> HI-REDUCTION 31 0.000251 0.000018
#> HI-REDUCTION 33 0.000053 0.000018
#> HI-REDUCTION 35 0.000039 0.000009
#> HI-REDUCTION 37 0.000018 0.000002
#> LO-REDUCTION 39 0.000009 0.000002
#> HI-REDUCTION 41 0.000004 0.000002
#> REFLECTION 43 0.000002 0.000001
#> HI-REDUCTION 45 0.000002 0.000000
#> Exiting from Nelder Mead minimizer
#> 47 function evaluations used
summary(pp2)
#> r0 R0 Gbar CFR_gen dbl_time
#> 0.2297113 3.1497921 6.0003859 0.0352000 3.0174706