Efficient simulation of individual-based population models: the R Package IBMPopSim
Daphné Giorgi, Sarah Kaakai, Vincent Lemaire
TL;DR
IBMPopSim solves the computational challenge of simulating heterogeneous, age-structured stochastic IBMs by combining a unified measure-valued SDE representation with thinning-based Poisson simulation implemented in C++ via Rcpp. The framework supports multiple event types (birth, entry, death/exit, swap) with intensities that can depend on time, age, characteristics, and inter-individual interactions, including quadratic interaction terms. Key contributions include rigorous non-explosion criteria, exact thinning-based and randomized algorithms, and practical workflows for model creation, simulation, and analysis (e.g., age pyramids and life-table outputs) across domains such as actuarial science and ecology. The package demonstrates its versatility and efficiency through detailed examples (insurance portfolios and trait-based interacting populations) and provides tools to study dynamic population structures under complex mortality and fertility regimes, with reproducible, high-performance simulations enabled by Rcpp.
Abstract
The R Package IBMPopSim aims to simulate the random evolution of heterogeneous populations using stochastic Individual-Based Models (IBMs). The package enables users to simulate population evolution, in which individuals are characterized by their age and some characteristics, and the population is modified by different types of events, including births/arrivals, death/exit events, or changes of characteristics. The frequency at which an event can occur to an individual can depend on their age and characteristics, but also on the characteristics of other individuals (interactions). Such models have a wide range of applications in fields including actuarial science, biology, ecology or epidemiology. IBMPopSim overcomes the limitations of time-consuming IBMs simulations by implementing new efficient algorithms based on thinning methods, which are compiled using the Rcpp package while providing a user-friendly interface.
