createSimmodule: Creates a Simulation module object.

View source: R/Simmodule.r

createSimmoduleR Documentation

Creates a Simulation module object.

Description

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:

Usage

createSimmodule(name)

Arguments

name

name of this object

Details

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.

Value

a list


kcha193/simarioV2 documentation built on April 8, 2024, 4:51 p.m.