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 and
be the next integer of the age when the survival function
reaches the minimum. Given the age increments,
, specified with argument
dx
, the function creates a partition of such that
for
. At each age interval it calculates the discrete survival,
lx
, as
The age- or stage-specific survival probability, px
, is calculated as
while the age- or stage-specific mortality probability, qx
, is .
If fertility was also calculated with function CalcDemo
, then the function includes the discrete age- or stage-specific fertility, bx
, as
where 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)