README.md

MicSim

MicSim is an R package for continuous-time microsimulation. You can use it to simulate how individual life courses unfold under different demographic, social or economic conditions.

A life course consists of the states a person occupies and the times at which they move between them. In continuous time, these transitions can occur at any point during the simulation period. You specify which transitions are possible and supply a rate, also called a hazard, for each one. MicSim uses those rates to draw when events occur and which state a person enters next.

MicSim builds on the methods developed in Sabine Zinn's doctoral dissertation at the University of Rostock in 2011. A Continuous-Time Microsimulation and First Steps Towards a Multi-Level Approach in Demography

Installation

MicSim 4.0.0 requires R 4.1 or later. Install MicSim from CRAN and load it in R.

install.packages("MicSim")
library(MicSim)

Getting started

Use micsim_model() to bring together the starting population, simulation period, state space and transitions. You can check the rates with validate() before running the model with simulate(). The result contains the model and the simulated life courses. Use as_long() for one row per spell in a state or as_wide() for one row per person.

Changes in version 4.0.0 are described in the release notes.

Citations

Run citation("MicSim") to get the citation for your installed version.

Zinn, S. (2014). The MicSim package of R: An entry-level toolkit for continuous-time microsimulation. International Journal of Microsimulation, 7(3), 3–32. Article

Licence

MicSim is licensed under the GNU General Public License, version 2 or later (GPL (>= 2)). CRAN package page



Try the MicSim package in your browser

Any scripts or data that you put into this service are public.

MicSim documentation built on Dec. 2, 2026, 1:09 a.m.