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
MicSim 4.0.0 requires R 4.1 or later. Install MicSim from CRAN and load it in R.
install.packages("MicSim")
library(MicSim)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.
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
MicSim is licensed under the GNU General Public License, version 2 or
later (GPL (>= 2)). CRAN package
page