simario: simario is a framework for executing multi-run dynamic...

simarioR Documentation

simario is a framework for executing multi-run dynamic micro-simulations, including under different scenarios, and taking measurements of the results.

Description

Each simulation establishes (via a parameter file) the set of variables (the simframe) used throughout the simulation. A simframe is a dataframe of multiple variables with observations (or values) for each micro-unit.

Usage

dict_example

Format

A Dictionary proto object

Details

Variables in the simframe, both categorical or continuous, can be modified before or during the simulation to test different scenarios.

A simulation consists of one or more modules called Simmodules.

A Simmodule contains user supplied R code to transform the simframe. Typically, transformations will move variables for micro-units in the simframe through multiple iterations (or time steps). Transformations occur based on transition probabilities, or generated via logistic, binomial, poission negative binomial, or normal models.

At the end of each iteration the current value of each variable for all micro-units is stored as an outcome. At the end of all iterations, the outcome list consists of a matrix for each variable giving its value for each micro-unit at each iteration.

At the end of each run a series of run stats is calculated on outcomes. A run stat is essentially a function that takes a matrix of outcomes across multiple iterations and produces an aggregate value. Example run stats include mean, frequency, summary, and quantile.

Run stats are averaged across multiple runs to get a final simulation result.

Final results can be displayed in tables or graphs, and can be compared across scenarios.


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