run_sim_break: run simulation with one or more breakpoints

View source: R/calibrate.R

run_sim_breakR Documentation

run simulation with one or more breakpoints

Description

run simulation with one or more breakpoints

Usage

run_sim_break(
  params,
  extra_pars = NULL,
  time_args = NULL,
  return_timevar = FALSE,
  sim_args = list(),
  ...
)

Arguments

params

parameters

extra_pars

parameters that are used to set up time-varying parameters, etc., but not used by run_sim: **FIXME** should contain rel_<parname> values matching the break dates. MAYBE rel_ or abs_ determines whether the value is relative to baseline *or* is absolute? (will require corresponding change in run_sim to allow this)

time_args

list containing break_dates, **FIXME and Symbol!

return_timevar

return data frame of params by time?

sim_args

parameters to pass to run_sim

...

extra args (why??)

See Also

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, rExp(), read_params(), repair_names_age(), restore(), run_sim_ageify(), 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()

Examples

params <- read_params("ICU1.csv")
pt <- data.frame(Date = "2020-03-01", Symbol = "beta0", Relative_value = NA)
r1 <- run_sim_break(params,
          time_args=list(params_timevar = pt),
                   sim_args=list(start_date="2020-02-01", end_date="2020-04-01"),
                   extra_pars=list(time_params = 0.5))
plot(r1,log=TRUE)
## can also use it to run without breaks ...
r2 <- run_sim_break(params, sim_args=list(start_date="2020-02-01", end_date="2020-04-01"))
plot(r2,log=TRUE)

bbolker/McMasterPandemic documentation built on Aug. 25, 2024, 6:35 p.m.