https://canmod.net/misc/flex_specs
flexmodel(
params,
state = NULL,
start_date = NULL,
end_date = NULL,
params_timevar = NULL,
do_hazard = getOption("MP_default_do_hazard"),
do_make_state = getOption("MP_default_do_make_state"),
do_hazard_lin = getOption("MP_default_do_hazard_lin"),
do_approx_hazard = getOption("MP_default_do_approx_hazard"),
do_approx_hazard_lin = getOption("MP_default_do_approx_hazard_lin"),
do_sim_constraint = getOption("MP_default_do_sim_constraint"),
sim_lower_bound = getOption("MP_default_sim_lower_bound"),
max_iters_eig_pow_meth = 8000,
tol_eig_pow_meth = 1e-06,
data = NULL,
...
)
init_model(...)
a param_pansim
object
a state_pansim
object
simulation start date
simulation end date
data frame with scheduling for piece-wise constant parameter variation (TODO: direct to other help pages)
should hazard simulation steps be used?
(https://canmod.net/misc/flex_specs#v0.0.5) -- only used
if spec_ver_gt('0.0.4')
should 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')
like do_hazard
but for the
linearized model that is used to construct the initial state
variable -- only used when do_make_state == TRUE
approximate the hazard transformation by a smooth function (experimental)
like do_approx_hazard
but for
the linearized model that is used to construct the initial
state (experimental)
should 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.
optional lower bound on the simulated values
when computing negative binomial loss functions (only applicable
when do_sim_constraint
is TRUE
.
maximum number of iterations to use in computing the eigenvector for initial state construction
tolerance for determining convergence of the power method used in initial state construction
optional observed data frame in long format to
compare with simulated trajectories. must have the following
columns: date
, var
, value
. (currently this is not working)
flexmodel object representing a compartmental model
Other flexmodels:
make_ageified_model()
,
make_base_model()
,
make_hello_world_model()
,
make_omicron_model()
,
make_sir_model()
,
make_vaccination_model()