createSimmodule | R Documentation |
A simulation module is really the core of a simulation. It contains the code and output for a distinct set of results generated, eg: health outcomes for years 1 - 10.
It contains the following key elements:
createSimmodule(name)
name |
name of this object |
outcomes - a list of all outcome matrices for the Simmodule.
each Simmodule has a simulateRun
method which transforms the simframe. Typically, transformations will
move variables for micro-units in the simframe through multiple iterations (or time steps).
At the end of each iteration, for outcome variables (as defined in the simframe), the current values
for all micro-units are stored in an outcome matrix.
An outcome matrix contains the set of values for each micro-unit during each iteration.
At the end of each run a set of run stats is calculated for outcomes. A run stat is essentially a function that takes an outcome matrix and produces an aggregate value for each iteration. This aggregate value may be a single value (eg: mean), a vector (eg: frequencies, quantiles, summary), or a matrix (eg: 2 way table).
Run stats are averaged across multiple runs by collateRunStats to get a final simulation result.
a list
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.