Package: IBMPopSim 1.1.0

IBMPopSim: Individual Based Model Population Simulation

Simulation of the random evolution of heterogeneous populations using stochastic Individual-Based Models (IBMs) <doi:10.48550/arXiv.2303.06183>. 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. For instance, IBMs can be used for simulating the evolution of a heterogeneous insurance portfolio with selection or for validating mortality forecasts. This package 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.

Authors:Daphné Giorgi [aut, cre], Sarah Kaakai [aut], Vincent Lemaire [aut]

IBMPopSim_1.1.0.tar.gz
IBMPopSim_1.1.0.zip(r-4.5)IBMPopSim_1.1.0.zip(r-4.4)IBMPopSim_1.1.0.zip(r-4.3)
IBMPopSim_1.1.0.tgz(r-4.4-x86_64)IBMPopSim_1.1.0.tgz(r-4.4-arm64)IBMPopSim_1.1.0.tgz(r-4.3-x86_64)IBMPopSim_1.1.0.tgz(r-4.3-arm64)
IBMPopSim_1.1.0.tar.gz(r-4.5-noble)IBMPopSim_1.1.0.tar.gz(r-4.4-noble)
IBMPopSim_1.1.0.tgz(r-4.4-emscripten)IBMPopSim_1.1.0.tgz(r-4.3-emscripten)
IBMPopSim.pdf |IBMPopSim.html
IBMPopSim/json (API)
NEWS

# Install 'IBMPopSim' in R:
install.packages('IBMPopSim', repos = c('https://daphnegiorgi.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/daphnegiorgi/ibmpopsim/issues

Uses libs:
  • c++– GNU Standard C++ Library v3
Datasets:
  • EW_popIMD_14 - England and Wales (EW) 2014 population and death rates by Index of Multiple Deprivation (IMD).
  • EW_pop_14 - England and Wales (EW) 2014 population, death and birth rates.
  • EW_pop_out - Example of "human population" after 100 years of simulation.
  • EWdata_hmd - England and Wale mortality data
  • toy_params - Toy parameters for IBMPopSim-human_popIMD vignette example.

On CRAN:

6.13 score 8 stars 14 scripts 361 downloads 69 exports 45 dependencies

Last updated 1 months agofrom:4228c0ab6c. Checks:OK: 9. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 10 2024
R-4.5-win-x86_64OKNov 10 2024
R-4.5-linux-x86_64OKNov 10 2024
R-4.4-win-x86_64OKNov 10 2024
R-4.4-mac-x86_64OKNov 10 2024
R-4.4-mac-aarch64OKNov 10 2024
R-4.3-win-x86_64OKNov 10 2024
R-4.3-mac-x86_64OKNov 10 2024
R-4.3-mac-aarch64OKNov 10 2024

Exports:add_characteristicadd_characteristic.populationage_pyramidage_pyramid.populationage_pyramidsage_pyramids.populationassertCharacteristicsassertEventsassertParametersassertPopulationassertPyramidcapitalizecheck_intensity_codecheck_interaction_codecheck_kernel_codecompatibility_chars_eventscompatibility_pop_modeldeath_tabledetails_cppdetails_intensity_codedetails_interaction_codedetails_kernel_codedetails_type_eventexposure_tableget_characteristicsget_characteristics.populationget_Ctypeget_Rtypegompertzhas_event_typeid_completelinfunmax.stepfunmerge_pop_withidmk_event_individualmk_event_inhomogeneous_poissonmk_event_interactionmk_event_poissonmk_individual_typemk_modelmk_parameters_typesmkcpp_declaration_individualmkcpp_definition_eventsmkcpp_eventmkcpp_initialisation_populationmkcpp_output_populationmkcpp_parametersmkcpp_popsimpiecewise_xpiecewise_xyplot.populationplot.pyramidpopsamplepopsample.pyramidpopsimpopulationpopulation_alivepopulation_alive.populationprint.eventprint.modelprint.populationpyramidstepfunsummary.eventsummary.logssummary.modelsummary.populationsummary.simulation_outputweibull

Dependencies:backportsbitbit64checkmateclicliprcolorspacecpp11crayondplyrfansifarvergenericsggplot2gluegtablehmsisobandlabelinglatticelifecyclemagrittrMASSMatrixmgcvmunsellnlmepillarpkgconfigprettyunitsprogressR6RColorBrewerRcppreadrrlangscalestibbletidyselecttzdbutf8vctrsviridisLitevroomwithr

Human population

Rendered fromIBMPopSim_human_pop.Rmdusingknitr::rmarkdownon Nov 10 2024.

Last update: 2024-10-10
Started: 2020-06-22

Human population with swap

Rendered fromIBMPopSim_human_pop_IMD.Rmdusingknitr::rmarkdownon Nov 10 2024.

Last update: 2024-10-10
Started: 2020-06-22

IBMPopSim C++ essentials

Rendered fromIBMPopSim_cpp.Rmdusingknitr::rmarkdownon Nov 10 2024.

Last update: 2024-10-10
Started: 2020-06-22

IBMPopSim package description

Rendered fromIBMPopSim.Rmdusingknitr::rmarkdownon Nov 10 2024.

Last update: 2024-10-10
Started: 2020-06-22

Insurance portfolio

Rendered fromIBMPopSim_insurance_portfolio.Rmdusingknitr::rmarkdownon Nov 10 2024.

Last update: 2024-10-10
Started: 2020-06-22

Population with genetically variable traits

Rendered fromIBMPopSim_interaction.Rmdusingknitr::rmarkdownon Nov 10 2024.

Last update: 2024-10-10
Started: 2020-06-22

Readme and manuals

Help Manual

Help pageTopics
IBMPopSim: Individual Based Model Population SimulationIBMPopSim-package IBMPopSim
Generic method for add_characteristicadd_characteristic
Add characteristic to a populationadd_characteristic.population
Generic method for age_pyramidage_pyramid
Age pyramid from a population at a given time.age_pyramid.population
Generic method for age_pyramidsage_pyramids
Age pyramid from a population data frame at some given times.age_pyramids.population
Check the intensity code.check_intensity_code
Check the interaction code.check_interaction_code
Check the kernel code.check_kernel_code
Check characteristics-events compatibilitycompatibility_chars_events
Check population-model compatibilitycompatibility_pop_model
Death tabledeath_table
England and Wales (EW) 2014 population, death and birth rates.EW_pop_14
Example of "human population" after 100 years of simulation.EW_pop_out
England and Wales (EW) 2014 population and death rates by Index of Multiple Deprivation (IMD).EW_popIMD_14
England and Wale mortality data (source: Human Mortality Database)EWdata_hmd
Exposure tableexposure_table
Generic method for get_characteristicsget_characteristics
Returns names and C types of the characteristics.get_characteristics.population
Gompertz–Makeham intensity function.gompertz
Linear interpolation function.linfun
Returns the maximum of a function of class 'stepfun'.max.stepfun
A function returning a merged dataframe from a list of population dataframes with id.merge_pop_withid
Creating an event with intensity of class individualmk_event_individual
Creating inhomogeneous Poisson class eventmk_event_inhomogeneous_poisson
Creating an event with intensity of type interactionmk_event_interaction
Creating Poisson class eventmk_event_poisson
Creates a model for IBMPopSim.mk_model
Piecewise real function.piecewise_x
Piecewise real function of two variables.piecewise_xy
Plot the age pyramid of a population data frame (at a given time).plot.population
Plot an age pyramid.plot.pyramid
Generic method for popsamplepopsample
Sample a population from an age pyramid (at a given time).popsample.pyramid
Simulation of a model.popsim
Class populationpopulation
Generic method for population_alivepopulation_alive
Returns a population of individuals alive.population_alive.population
Print Eventprint.event
Printing of a modelprint.model
Printing populationprint.population
Class pyramidpyramid
Step Function.stepfun
Summarizing an eventsummary.event
Summary logssummary.logs
Summary of a modelsummary.model
Summary populationsummary.population
Summary simulation outputsummary.simulation_output
Toy parameters for IBMPopSim-human_popIMD vignette example.toy_params
Weibull function.weibull