Map parameters to the deterministic mean incidence increments for a stochastic epidemic model.

map_pars_2_ode(
  pathmat,
  ode_times,
  ode_pars,
  ode_param_vec,
  ode_param_inds,
  ode_tcovar_inds,
  init_start,
  param_update_inds,
  stoich_matrix,
  forcing_inds,
  forcing_tcov_inds,
  forcings_out,
  forcing_transfers,
  step_size,
  ode_pointer,
  set_pars_pointer
)

Arguments

pathmat

matrix where the ODE path should be stored

ode_times

vector of interval endpoint times

ode_pars

numeric matrix of parameters, constants, and time-varying covariates at each of the ode_times

init_start

index in the parameter vector where the initial compartment volumes start

param_update_inds

logical vector indicating at which of the times the ode parameters need to be updated.

stoich_matrix

stoichiometry matrix giving the changes to compartments from each reaction

forcing_inds

logical vector of indicating at which times in the time-varying covariance matrix a forcing is applied.

step_size

initial step size for the ODE solver (adapted internally, but too large of an initial step can lead to failure in stiff systems).

ode_pointer

external pointer to ode integration function.

set_pars_pointer

external pointer to the function for setting the ode parameters.

forcing_matrix

matrix containing the forcings.

Value

List containing the ODE incidence and prevalence paths.