
Exact simulation of a compartmental model and its surveillance counts
Source:R/ga_model.R
ga_simulate.RdGillespie simulation of the Markov jump process defined by model, with
counts aggregated over intervals of length Delta and reported counts
drawn as binomial thinning plus Gaussian measurement error (rounded and
truncated at zero), the data-generating process assumed by ga_loglik().
Arguments
- model
A
ga_model().- theta
Named list or vector with the rate parameters of
modeland any parameters named inobs.- init_counts
Named integer vector of initial counts per compartment.
- obs
List of
ga_incidence()/ga_prevalence()streams.- n
Number of intervals.
- Delta
Length of the observation interval.
- varying
Optional named list of rate parameters that change between intervals, each a vector of length
n(as inga_loglik()); a rate listed here may be absent fromtheta.