CalcDemo {paramDemo}R Documentation

Calculating Parametric Age-Specific Mortality, Survival, and Fertility

Description

CalcDemo is used to calculate age-specific demographic rates and summary statistics from parametric models of survival and fertility.

Usage

CalcDemo(theta = NULL, beta = NULL, x = NULL, dx = NULL, 
          model = "GO",  shape = "simple", modelFert = "quadratic", 
          type = "both", minSx = 0.01,  summarStats = TRUE, 
          ageMatur = 0, maxAge = NULL, agesAR = NULL,  
          SxValsAR = NULL)

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. If NULL (default), ages are constructed from age 0 to the age when the survival function reaches 0.0001.

dx

Numerical value for age increments. If NULL, the default value is 0.01.

model

Mortality model, options are “EX” = exponential (i.e., constant mortality with age), “GO” = Gompertz (default), “WE” = Weibull, or “LO” = logistic.

shape

The overall shape of the mortality 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)

type

Character string specifying the demographic rates to be calculated. Options are “both” (default), “survival”, “fertility”.

minSx

Numerical value specifying the lower bound of the survival function to find the maximum age. The default is 0.01.

summarStats

Logical specifying whether summary statistics such as life expectancy, lifespan equality and ageing rates at the specified ages should be calculated.

ageMatur

Numerical value specifying the age at sexual maturity, used as the lower bound for the age-specific fertility. Default is 0.

maxAge

Numerical values for the maximum age for survival and fertility demographic rates. If NULL (default), the maximum age is calculated when the survival function reaches minSx.

agesAR

Numerical vector of ages at which ageing rates should be calculated. If NULL (default) they are calculated at the ages when the survival function reaches 0.5, 0.2, and 0.05.

SxValsAR

Alternative to agesAR, numerical value for the levels of survival at which ageing rates should be calculated. If NULL (default) they are calculated at the ages when the survival function reaches 0.5, 0.2, and 0.05.

Details

1) Age-specific mortality and survival models:

The function CalcDemo uses parametric functions to calculate age-specific survival, defined as the probability of surviving to a given age. The function follows the conventions from package BaSTA (Colchero and Clark 2012, Colchero et al. 2012, Colchero et al. 2021). 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. From the mortality function, the survival function is then given by

S(x | \bm{\theta}) = \exp[-\int_0^x \mu(t | \bm{\theta}) dt].

1.1)Argument model:

The model argument allows the user to choose between four basic mortality functions, namely

(a) model = EX”: The exponential model (Cox and Oakes 1974), with constant mortality with age, specified as

\mu_b(x | \bm{\theta}) = b,

where b > 0, with survival

S_b(x | \bm{\theta}) = \exp[-b x].

(b) model = GO”: The Gompertz mortality model (Gompertz 1925, Pletcher 1999), calculated as

\mu_b(x | \bm{\theta}) = \exp(b_0 + b_1 x),

where -\infty < b_0, b_1 < \infty, with survival

S_b(x | \bm{\theta}) = \exp\left[\frac{e^{b_0}}{b_1}\left(1 - e^{b_1 x}\right)\right].

(c) model = WE”: The Weibull mortality model (Pinder III et al. 1978) calculated as

\mu_b(x | \bm{\theta}) = b_0 b_1^{b_0} x^{b_0 -1},

where b_0, b_1 > 0, with survival

S_b(x | \bm{\theta}) = \exp\left[-(b_1 x)^{b_0}\right].

(d) model = LO”: The logistic mortality model (Pletcher 1999), calculated as

\mu_b(x | \bm{\theta}) = \frac{\exp(b_0 + b_1 x)}{1 + b_2 \frac{e^{b_0}}{b_1} \left(e^{b_1 x}-1\right)},

where b_0, b_1, b_2 > 0, with survival

S_b(x | \bm{\theta}) = \left[1 + b_2 \frac{e^{b_0}}{b_1} \left(e^{b_1 x} - 1\right)\right]^{-1 / b_2}.

1.2)Argument shape:

The shape argument allows the user to extend these models in order to explore more complex mortality shapes.

(a) shape = simple”: (default) Leaves the model as defined above, with mortality given by

\mu(x | \bm{\theta}) = \mu_b(x | \bm{\theta})

and survival

S(x | \bm{\theta}) = S_b(x | \bm{\theta}.

(b) shape = Makeham”: A constant is added to the mortality, such that the mortality is given by

\mu(x | \bm{\theta}) = c + \mu_b(x | \bm{\theta}_1),

where \bm{\theta} = [c, \bm{\theta}_1], and with survival

S(x | \bm{\theta}) = e^{-cx} S_b(x | \bm{\theta}_1)

The most common models with this shape is the Gompertz-Makeham model (Gompertz 1825, Makeham 1866).

(c) shape = bathtub”: produces a concave shapes in mortality by adding a declining Gompertz term and a constant parameter to the basic mortality model, where the mortality function is

\mu(x | \bm{\theta}) = \exp(a_0 - a_1 x) + c + \mu_b(x | \bm{\theta}_1),

where a_0 \in \mathbb{R}, a_1, c \geq 0 and \bm{\theta}_1 \subset \bm{\theta} are specified based on argument model, and with survival

S(x | \theta) = \exp\left[\frac{e^{a_0}}{a_1}\left(e^{a_1 x} - 1\right)-cx\right] S_b(x | \theta_1).

The most widely use “bathtub” shaped model is the Siler mortality model (Siler 1979), which provides considerably good fits to mammalian data. The arguments for the Siler model are:

CalcDemo(..., model = "GO", shape = "bathtub", ...)

2) Specifying theta parameters:

Argument theta requires a numerical vector of parameters. For instance, for a Gompertz model with simple shape and with parameter vector \bm{\theta}^{\top} = [b_0, b_1] where b_0 = -5 and b_1 = 0.1, the argument should be specified as

CalcDemo(theta = c(b0 = -5, b1 = 0.1), ...)

Note that in this example the parameter names are specified directly, this is required when checkTheta = FALSE. Although assigning the names to each parameter is not necessary when checkTheta = TRUE, it is advisable to ensure that the right values are assigned to the right parameter.

If argument checkTheta is set to TRUE, then the vector of theta parameters is verified for consistency with the requirements of the model and shape selected.

3) Age-specific fertility models:

The age-specific fertility models correspond to the expected number of offspring produced by adults of a given age. Therefore, for a random variable Y_{x} with realizations y_x for the number of offspring produced by adults of age x, we have that E(Y_x) = g(x | \bm{\beta}), where g: \mathbb{R}_{\ge 0} \rightarrow \mathbb{R}_{\ge 0} is a non-negative smooth fertility function and \bm{\beta} is a vector of parameters to be estimated. The functional forms of function g fall in two main categories, namely polynomial and distributional models.

3.a) Polynomial:

Of the models available in paramDemo, the “quadratic”, “PeristeraKostaki” (Peristera and Kostaki 2007), and “ColcheroMuller” (Colchero et al. 2021, Muller et al. 2020) fall within the polynomial category. Both, the “PeristeraKostaki” and “ColcheroMuller” are non-symmetric around the age at maximum fertility.

3.b) Distributional:

The distributional models are of the form

g(x | \bm{\beta}) = R f(x | \bm{\beta}_1),

where f: \mathbb{R}_{\ge 0} \rightarrow \mathbb{R}_{\ge 0} is a probability density function, R > 0 is a parameter for the total fertility rate, and \bm{\beta}_1 \subset \bm{\beta} is a vector of parameters. The “Hadwiger” (Hadwiger 1940), “gamma” (Hoem et al. 1981), “beta” (Hoem et al. 1981), “skewNormal” (Mazzuco and Scarpa 2011, 2015), “gammaMixture” (Hoem et al. 1981), “HadwigerMixture” (Chandola et al. 1991), “skewSymmetric” (Mazzuco and Scarpa 2011, 2015), and “skewLogistic” (Asili et al. 2014) all fall in this category. Notably, the “gammaMixture”, “HadwigerMixture”, “skewSymmetric”, “skewLogistic” are appropriate when fertility might be bimodal (Hoem et al. 1981, Chandola et al. 1999, Mazzuco and Scarpa 2011, 2015, Asili et al. 2014).

4) Specifiying beta parameters:

Argument beta requires a vector of parameters. For instance, for a quadratic model with parameter vector \bm{\beta}^{\top} = [b_0, b_1, b_2] where b_0 = 0.5, b_1 = 0.01 and b_2 = 10, the argument should be specified as

CalcDemo(..., beta = c(b0 = 0.5, b1 = 0.01, b2 = 10), ...)

Note that in this example the parameter names are specified directly, this is required when checkBeta = FALSE. Although assigning the names to each parameter is not necessary when checkBeta = TRUE, it is advisable to ensure that the right values are assigned to the right parameter.

If argument checkBeta is set to TRUE, then the vector of beta parameters is verified for consistency with the requirements of the fertility model selected.

5) Summary statistics:

5.1) Ageing rates:

Given a vector of ages x_1, x_2, \dots, x_n specified by the user with argument agesAR, 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.

5.2) Ages at different levels of survival:

The function calculates the ages when the survival function reaches specific values(default at 0.2, 0.1, 0.05), commonly used as population measures of old age. Thus, for a given value s = S(x), the function computes the inverse function

x = S^{-1}(s).

5.3) Remaining life expectancy:

The function calculates the life expectancy at birth as

e_{0} = \int_{0}^{\infty} S(t) dt.

5.4) Measures of inequality and equality:

The function calculates different measures of inequality and equality in the distribution of ages at death that results from the parametric model:

- Lifespan inequality: (Demetrius 1974, Keyfitz and Caswell 2005) given by

H = -\frac{\int_{0}^{\infty} S(x) \ln [S(x)] dx}{e_0}

- Lifespan equality: (Colchero et al. 2016, Colchero et al. 2021) given by

\varepsilon = - \ln H.

- Gini coefficient: (Gini 1912, Shkolnikov et al. 2003) given by

G = 1 - \frac{1}{e_0} \int_0^{\infty} [l(x)]^2 dx

- Coefficient of variation: given by

CV = \frac{\sqrt{\sigma^2}}{e_0},

where \sigma^2 is the variance in ages at death.

Value

CalcDemo returns an object of class “paramDemo” with output consisting of two lists, one for survival and one for fertility. The survival list can be called as object$surv while the fertility list is in object$fert. Both include the following outputs:

functs

data.frame including the follwing columns for survival: age, mort for the mortality function, surv for the survival, pdf for the probability density function of ages at death, and cumhaz for the cumulative hazards. For fertility it includes columns for age and fert for the age-specific fertility.

summStats

list with elements: calculated indicating whether summary statistics were calculated, ageingRates with the resulting actuarial ageing rates, and summStatsMort with ages at which the survival function reaches different levels (default 0.5, 0.2, 0.05) (e.g., AgeSx=0.5), with the life expectancy lifeExp, lifespIneq for the lifespan inequality (see Demetrius 1974), lifespEqual with the lifespan equality as in Colchero et al. (2021), Gini for the Gini coefficient, and CoeffVar for the coefficient of variation in the distribution of ages at death. For fertility, the list includes a logical calculated to indicate if summary statistics were calculated, and summStatsFert with the age at maximum fertility calculations (see CalcAgeMaxFert).

settings

list with the details of the parameters and the models used.

analyzed

logical indicating whether surv or fert were calculated.

Author(s)

Fernando Colchero fernando_colchero@eva.mpg.de

References

Asili S., Rezaei S., Najjar, L. (2014) Using Skew-Logistic Probability Density Function as a Model for Age-Specific Fertility Rate Pattern. BioMed Research International, 2014, 790294.

Azzalini, A. (1985) A Class of Distributions Which Includes the Normal Ones. Scandinavian Journal of Statistics, 2, 171-178.

Chandola, T., Coleman D.A., Hiorns R.W. (1999) Recent European fertility patterns: Fitting curves to ‘distorted’ distributions. Population Studies, 53, 317-329.

Colchero, F. (In prep.) Inference on age-specific fertility in ecology and evolution. Learning from other disciplines and improving the state of the art.

Colchero, F., Eckardt, W., Stoinski, T. (2021) Evidence of demographic buffering in an endangered great ape: Social buffering on immature survival and the role of refined sex-age classes on population growth rate. Journal of Animal Ecology, 90, 1701-1713.

Colchero, F., J.S. Clark (2012) Bayesian inference on age-specific survival from capture-recapture data for censored and truncated data. Journal of Animal Ecology. 81, 139-149.

Colchero, F., O.R. Jones, M. Rebke. (2012) BaSTA: an R package for Bayesian estimation of age-specific survival from incomplete mark-recapture/recovery data with covariates. Method in Ecology and Evolution. 3, 466-470.

Colchero, F., et al. (2021) The long lives of primates and the “invariant rate of aging” hypothesis. Nature Communications 12:3666

Cox, D. R., and Oakes D. (1984) Analysis of Survival Data. Chapman and Hall, London.

Demetrius, L. (1974) Demographic parameters and natural selection. PNAS 71, 4645-4647.

Gompertz, B. (1825) On the nature of the function expressive of the law of human mortality, and on a new mode of determining the value of life contingencies. Philosophical Transactions of the Royal Society of London, 115, 513-583.

Hadwiger, H. (1940) Eine analytische Reproduktionssunktion fur biologische Gesamtheiten. Scandinavian Actuarial Journal, 1940, 101-113.

Hoem, J.M., Madien, D., Nielsen, J.L., Ohlsen, E.M., Hansen, H.O., Rennermalm, B. (1981) Experiments in modelling recent Danish fertility curves. Demography, 18, 231-244.

Keyfitz, N., Caswell, H. (2005) Applied Mathematical Demography. (Springer-Verlag).

Makeham, W. M. (1866) On the law of mortality Journal of the Institute of Actuaries 13, 1-34.

Mazzuco, S., Scarpa, B. (2011) Fitting age-specific fertility rates by a skew- symmetric probability density function. (Working paper 10), University of Padua.

Mazzuco, S., Scarpa, B. (2015) Fitting age-specific fertility rates by a flexible generalized skew normal probability density function. Journal of the Royal Statistical Society: Series A, 178, 187-203.

Muller M. N., Blurton Jones N. G, Colchero F., Thompson M. E., Enigk D. K. (2020) Sexual dimorphism in chimpanzee (Pan troglodytes schweinfurthii) and human age-specific fertility. Journal of human evolution, 144, 102795.

Peristera P., Kostaki A. (2007) Modeling fertility in modern populations. Demographic Research, 16, 141-194.

Pinder III, J.E., Wiener, J.G. and Smith, M.H. (1978) The Weibull distribution: a new method of summarizing survivorship data. Ecology, 59, 175-179.

Shkolnikov, V., Andreev, E., Begun, A. Z. (2003) Gini coefficient as a life table function. Demographic Research 8, 305-358.

Siler W. A (1979) competing-risk model for animal mortality. Ecology 60, 750-757.

See Also

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

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

CalcLifeHist to calculate life history variables from parametric demographic models.

Examples

# Create paramDemo object from Gompertz mortality and
# quadratic fertility:
dem <- CalcDemo(theta = c(b0 = -5, b1 = 0.1), 
                 beta = c(b0 = 0.5, b1 = 0.01, b2 = 10),
                 summarStats = TRUE, agesAR = c(5, 10))

# Plot demographic object:
plot(dem)


[Package paramDemo version 1.0.1 Index]