Skip to contents

In many instances, it is useful to calculate with a population with known parameters. To generate a population with realistic characteristics is less obvious than it seems. We operate here with the Gompertz distribution which provides a reasonable approximation of human mortality for adult mortality, that is for the ages >= 15 years. The user has to specify either the parameter b or the modal age M. The modal age M is particular useful as it provides an intuitive understanding of the resulting age distribution. In both instances, the second parameter a is generated by the regression formula found by Sasaki and Kondo 2016. If neither is given, a population with random parameters realistic for pre-modern times is generated.

Usage

pop.sim.gomp(n, b = NULL, M = NULL, start_age = 15, max_age = 100)

Arguments

n

number of individuals to be simulated.

b

numeric, optional. Gompertz parameter controlling the level of mortality.

M

numeric, optional. Modal age M.

start_age

numeric. Start age, default: 15 years.

max_age

numeric. Maximal age, to avoid unlikely centenaries, default: 100 years.

Value

A list of two data.frames with the following items:

First data.frame

  • N: Number of individuals.

  • b: Gompertz parameter controlling mortality.

  • M: Modal age.

  • a: Gompertz parameter controlling hazard of the youngest age group.

Second data.frame

  • ind: ID of individuals.

  • age: Simulated absolute age.

References

sasaki_kondo_2016mortAAR

Examples


pop_sim <- pop.sim.gomp(n = 10000, M = 35)
pop_sim <- pop.sim.gomp(n = 10000, b = 0.03)
pop_sim <- pop.sim.gomp(n = 10000)