Converts a classic ageified model to a flexmodel
make_ageified_model(..., min_age = 0, max_age = 100, do_ageing = FALSE)Arguments passed on to flexmodel
paramsa param_pansim object
statea state_pansim object
start_datesimulation start date
end_datesimulation end date
params_timevardata frame with scheduling for piece-wise constant parameter variation (TODO: direct to other help pages)
do_hazardshould hazard simulation steps be used?
(https://canmod.net/misc/flex_specs#v0.0.5) -- only used
if spec_ver_gt('0.0.4')
do_hazard_linlike do_hazard but for the
linearized model that is used to construct the initial state
variable -- only used when do_make_state == TRUE
do_approx_hazardapproximate the hazard transformation by a smooth function (experimental)
do_approx_hazard_linlike do_approx_hazard but for
the linearized model that is used to construct the initial
state (experimental)
do_make_stateshould state be remade on the c++ size?
(https://canmod.net/misc/flex_specs#v0.1.1) -- only used
if spec_ver_gt('0.1.0')
do_sim_constraintshould simulated values be smoothly
constrained to be above sim_lower_bound when computing
negative binomial (maybe others in the future?) loss functions?
the smooth constraint function is
\(y = x + \epsilon * \exp(-x / \epsilon)\), where \(\epsilon\)
is sim_lower_bound and \(x\) is the simulated value.
sim_lower_boundoptional lower bound on the simulated values
when computing negative binomial loss functions (only applicable
when do_sim_constraint is TRUE.
max_iters_eig_pow_methmaximum number of iterations to use in computing the eigenvector for initial state construction
tol_eig_pow_methtolerance for determining convergence of the power method used in initial state construction
dataoptional observed data frame in long format to
compare with simulated trajectories. must have the following
columns: date, var, value. (currently this is not working)
Other flexmodels:
flexmodel(),
make_base_model(),
make_hello_world_model(),
make_omicron_model(),
make_sir_model(),
make_vaccination_model()
Other canned_models:
make_base_model(),
make_hello_world_model(),
make_omicron_model(),
make_sir_model(),
make_vaccination_model()