integrate_odes: Obtain the path of the deterministic mean of a stochastic...

View source: R/RcppExports.R

integrate_odesR Documentation

Obtain the path of the deterministic mean of a stochastic epidemic model by integrating the corresponding ODE functions.

Description

Obtain the path of the deterministic mean of a stochastic epidemic model by integrating the corresponding ODE functions.

Usage

integrate_odes(
  ode_times,
  ode_pars,
  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

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.

Value

List containing the ODE incidence and prevalence paths.


fintzij/stemr documentation built on March 25, 2022, 12:25 p.m.