simulate based on a vector of parameters (including both time-varying change parameters, initial conditions, and other dynamical parameters), for fitting or forecasting
vector of parameters - on the link (log/logit) scale as appropriate; these are the parameters that will be adjusted during calibration
starting parameters (and structure). Parameters
that are part of the params_pansim
parameter vector can
be specified within the params
element (with prefixes
if they are transformed); other parameters can include
distributional parameters or time-varying parameters
baseline parameters (an object (vector?) of
type params_pansim
containing all of the parameters
needed for a simulation; some may be overwritten during the
calibration process)
starting date for sims (far enough back to allow states to sort themselves out)
ending date
arguments passed to sim_fun
parameters to fix
stochastic settings (see run_sim
)
dates on which to enable stochasticity (vector of dates with names 'proc' and 'obs')
additional arguments to pass to
run_sim
arguments passed to
aggregate.pansim
specify values to return (aggregated simulation, or just the values?)
function for simulating a single run
(e.g. run_sim_break
,
run_sim_mobility
)
calculate and include R(t) in prediction/forecast?
print debugging messages?
extra args (ignored)
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()
,
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()
ff <- ont_cal1$forecast_args
op <- ff$opt_pars
p <- unlist(op)
params <- fix_pars(read_params("ICU1.csv"))
forecast_sim(p, op, base_params=params,ff$start_date, ff$end_date,
time_args=ff$time_args)
#> # A tibble: 1,722 × 3
#> date var value
#> <date> <chr> <dbl>
#> 1 2020-01-30 S 999945
#> 2 2020-01-30 E 23
#> 3 2020-01-30 I 30
#> 4 2020-01-30 H 1
#> 5 2020-01-30 ICU 1
#> 6 2020-01-30 R 0
#> 7 2020-01-30 hosp NA
#> 8 2020-01-30 X 0
#> 9 2020-01-30 death NA
#> 10 2020-01-30 D 0
#> # … with 1,712 more rows