Learn R Programming

paramDemo (version 1.0.2)

CalcAgeingRateMort: Calculating actuarial and reproduction aging rates.

Description

CalcAgeingRateMort and CalcAgeingRateFert are used to calculate actuarial and reproductive ageing rates from parametric models of mortality and fertility.

Usage

CalcAgeingRateMort(theta, x, model = "GO", shape = "simple", 
                   checkTheta = TRUE)

CalcAgeingRateFert(beta, x, modelFert = "quadratic", ageMatur = 0, checkBeta = TRUE)

Value

The functions output a matrix with the ages at which ageing rates were calculated, the estimated actuarial rate of ageing, and the level of survival at that age.

Arguments

theta

Numerical vector of age-specific mortality parameters (see details).

beta

Numerical vector of age-specific fertility parameters (see details.)

x

Numerical vector of ages at which to calculate mortality.

model

The underlying mortality model to be used. "EX" = exponential,"GO" = Gompertz, "WE" = Weibull and "LO" = logistic (see details).

shape

The overall shape of the model. Values are: simple = no extra parameters added; Makeham = a constant parameter is added to the mortality; and bathtub = a Gompertz declining mortality for early ages and a constant parameter are added to the mortality model (see details).

modelFert

Age-specific fertility model. Options are “quadratic” (default), “PeristeraKostaki”, “ColcheroMuller”, “Hadwiger”, “gamma”, “beta”, “skewNormal”, “gammaMixture”, “HadwigerMixture”, “skewSymmetric”, “skewLogistic” (see details)

ageMatur

Numerical value for the age at sexual maturity.

checkTheta

Logical to verify that the theta parameters conform with the mortality model's specification (see details).

checkBeta

Logical to verify that the beta parameters conform with the fertility model's specification (see details).

Author

Fernando Colchero fernando_colchero@eva.mpg.de

Details

The function CalcAgeingRateMort uses parametric functions to calculate the actuarial (i.e., mortality) rate of ageing. The function follows the conventions from package BaSTA (Colchero and Clark 2012, Colchero et al. 2012, Colchero et al. 2021) to select the parametric model of mortality. The mortality function describes how the risk of mortality changes with age, and is defined as $$ \mu(x | \theta) = \lim_{\Delta x \rightarrow 0} \frac{\Pr[x < X < x + \Delta x | X > x]}{\Delta x}, $$ where \(X\) is a random variable for ages at death, \(x \geq 0\) are ages and \(\theta\) is the vector of mortality parameters. (For further details on the mortality and survival models see CalcMort).

Given a vector of ages \(x_1, x_2, \dots, x_n\) specified by the user with argument x, the function calculates ageing rates at age \(x_i\) as $$ \frac{d}{dx}\ln [\mu(x)] |_{x = x_i}, $$ for \(i = 1, 2, \dots, n\).

Similarly, function CalcAgeingRatesFert calculate reproductive ageing rates from parametric models of age-specific fertility, \(g(x)\). It uses a numerical approximation to $$ \frac{d}{dx}\ln [g(x)] |_{x = x_i}, $$ for \(i = 1, 2, \dots, n\).

See Also

CalcSurv to calculate age-specific survival, CalcMort to calculate age-specific mortality, CalcFert to calculate age-specific fertility.

CalcAgeMaxFert to calculate the age at maximum fertility from parametric models of age-specific fertility. CalcRemainLifeExp to calculate remaining life expectancy from parametric models of age-specific mortality.

Examples

Run this code
# Calculate actuarial ageing rate from Gompertz model:
arm <- CalcAgeingRateMort(theta = c(b0 = -5, b1 = 0.1), x = 10)

# Calculate reproductive ageing rate from quadratic model:
arf <- CalcAgeingRateFert(beta = c(b0 = 2, b1 = 0.0025, b2 = 2), x = 10,
                          modelFert = "quadratic")

Run the code above in your browser using DataLab