Represent a Standard Unstructured Model as a flexmodel

make_base_model(...)

Arguments

...

Arguments passed on to flexmodel

params

a param_pansim object

state

a state_pansim object

start_date

simulation start date

end_date

simulation end date

params_timevar

data frame with scheduling for piece-wise constant parameter variation (TODO: direct to other help pages)

do_hazard

should 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_lin

like 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_hazard

approximate the hazard transformation by a smooth function (experimental)

do_approx_hazard_lin

like do_approx_hazard but for the linearized model that is used to construct the initial state (experimental)

do_make_state

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')

do_sim_constraint

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.

sim_lower_bound

optional lower bound on the simulated values when computing negative binomial loss functions (only applicable when do_sim_constraint is TRUE.

max_iters_eig_pow_meth

maximum number of iterations to use in computing the eigenvector for initial state construction

tol_eig_pow_meth

tolerance for determining convergence of the power method used in initial state construction

data

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)