Runs a stochastic malaria transmission model using an odin-generated model object, storing state outputs across multiple time steps and particles.
Arguments
- odin_mod
An
odinmodel object (usually created withodin::odin()), representing the compiled malaria model.- pars
A named list of parameters to pass to the model.
- time_start
Numeric value specifying the starting time (e.g., 0).
- n_particles
Integer; number of particles used in the stochastic simulation (i.e., number of replicate simulations).
- sim_time
Integer; total number of time steps (days) to simulate.
Value
A list with two elements:
- x
A 3D array of simulation results with dimensions
[state, particle, time].- model
The
odinmodel object after simulation (can be used to inspect internals).