R/RcppExports.R
simulate_gillespie.Rd
Simulate a stochastic epidemic model path via Gillespie's direct method and returns a matrix containing a simulated path from a stochastic epidemic model.
simulate_gillespie(
flow,
parameters,
constants,
tcovar,
t_max,
init_states,
rate_adjmat,
tcovar_adjmat,
tcovar_changemat,
init_dims,
forcing_inds,
forcing_tcov_inds,
forcings_out,
forcing_transfers,
rate_ptr
)
Flow matrix
Vector of parameters
vector of constants
matrix of time-varying covariates
vector of initial compartment counts
adjacency matrix for updating rates after each event
adjacency matrix for updating rates after each time a covariate changes
indicator matrix identifying which covariates change at each time
initial estimate for dimensions of the bookkeeping matrix, calculated as sum_strata(stratum size x number states x 3), rounded to the next greatest power of 2.
logical vector of indicating at which times in the time-varying covariance matrix a forcing is applied.
external function pointer to the lumped rate functions.
matrix containing the forcings.
matrix with a simulated path from a stochastic epidemic model.