R/life_elas.R
life_elas.Rd
Calculate Keyfitz's entropy from a vector of age-specific survivorship
(lx
), or from the U submatrix of a matrix population model.
life_elas(lx, trapeze = FALSE, ...)
Either a survivorship trajectory (a vector of monotonically-declining values in the interval [0,1]), or submatrix U from a matrix population model.
A logical argument indicating whether the composite trapezoid approximation should be used for approximating the definite integral.
Additional variables passed to `mpm_to_lx` if data are supplied as a matrix. This could include the `start` argument to select a starting stage.
Keyfitz's life table entropy.
Note that this function, which was formerly called `entropy_k` may produce
unexpected results if used on partial survivorship trajectories. In addition,
it is sensitive to the length of the survivorship vector. We direct users to
the function `shape_surv
` which is relatively robust to these
issues.
Furthermore, de Vries et al. 2023 have shown that the way this function
calculates entropy is problematic for other reasons. We recommend to use
`entropy_k_age
` or ``entropy_k_stage
` as
alternatives, See de Vries et al. 2023 for details.
Keyfitz, N. 1977. Applied Mathematical Demography. New York: Wiley.
Demetrius, L., & Gundlach, V. M. 2014. Directionality theory and the entropic principle of natural selection. Entropy 16: 5428-5522.
de Vries, C., Bernard, C., & Salguero-Gómez, R. 2023. Discretising Keyfitz' entropy for studies of actuarial senescence and comparative demography. Methods in Ecology and Evolution, 14, 1312–1319. <doi:10.1111/2041-210X.14083>
Other life history traits:
entropy_d()
,
entropy_k_age()
,
entropy_k_stage()
,
entropy_k()
,
gen_time()
,
life_expect_mean()
,
longevity()
,
net_repro_rate()
,
repro_maturity
,
shape_rep()
,
shape_surv()
data(mpm1)
# derive lx trajectory, starting from stage 2
lx <- mpm_to_lx(mpm1$matU, start = 2)
# calculate Keyfitz' entropy
life_elas(lx)
#> [1] 0.9077186
# use trapezoid approximation for definite integral
life_elas(lx, trapeze = TRUE)
#> [1] 1.128087
# calculate directly from the matrix
life_elas(mpm1$matU)
#> [1] 0.4760507