| CalcDiscrDemo {paramDemo} | R Documentation |
Calculating Demographic Rates on Discrete Age Intervals from Parametric Age-Specific Mortality
Description
CalcDiscrDemo is used to calculate survival and fertility functions (i.e., lx, px, and qx) on discrete age intervals from an object of class “paramDemo” created with function CalcDemo.
Usage
CalcDiscrDemo(demo, dx = 1)
Arguments
demo |
Object of class “ |
dx |
Numeric value for the age increments. Default is |
Details
CalcDiscrDemo takes the continuous survival functions from an object of class “paramDemo” and calculates the basic survival probabilities and, if available, fertility rates on discrete age intervals.
Let x \geq 0 and \omega \in \mathbb{N} be the next integer of the age when the survival function S(x) reaches the minimum. Given the age increments, \Delta x, specified with argument dx, the function creates a partition of [0, \omega] such that [x_i, x_i + \Delta x) \subset [0, \omega] for i = 1, \dots, n. At each age interval it calculates the discrete survival, lx, as
l_{x_i} = S(x_i).
The age- or stage-specific survival probability, px, is calculated as
p_{x_i} = \frac{S(x_i + \Delta x)}{S(x_i)},
while the age- or stage-specific mortality probability, qx, is q_{x_i} = 1 - p_{x_i}.
If fertility was also calculated with function CalcDemo, then the function includes the discrete age- or stage-specific fertility, bx, as
b_{x_i} = b\left(x_i + \frac{\Delta x}{2}\right) \Delta x,
where b(x) is the continuous fertility function.
Value
CalcDiscrDemo returns an object of class “discrDemo” that consist of a matrix with the following columns:
age |
Partition of the full age subset into discrete intervals |
lx |
Survival or cumulative survival |
px |
The age- or stage-specific survival probability |
qx |
The age- or stage-specific mortality probability |
bx |
If available, the age- or stage-specific fertility |
Author(s)
Fernando Colchero fernando_colchero@eva.mpg.de
See Also
CalcDemo to create an object of class “paramDemo”.
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))
# Create discrete demographic object:
demDisc <- CalcDiscrDemo(dem, dx = 1)