# kEntropy: Calculate Keyfitz's entropy from a matrix population model In jonesor/Rage: Miscellaneous functions for COMADRE/COMPADRE matrix databases

## Description

This function calculates Keyfitz's entropy from a matrix population model, by first using age-from-stage decomposition methods to estimate age-specific survivorship (lx).

## Usage

 1 kEntropy(matU, startLife = 1, nSteps = 100, trapeze = FALSE)

## Arguments

 matU The survival component of a matrix population model (i.e. a square projection matrix reflecting survival-related transitions; e.g. progression, stasis, and retrogression) startLife The index of the first stage at which the author considers the beginning of life. Defaults to 1. nSteps The age-cutoff for the decomposition of age-specific survival (lx). This allows the user to exclude ages after which mortality or fertility has plateaued (see function qsdConverge for more information). Defaults to 100. trapeze A logical argument indicating whether the composite trapezoid approximation should be used for approximating the definite integral.

## Value

Returns an estimate of Keyfitz's life table entropy.

## Author(s)

Owen R. Jones <[email protected]>

Roberto Salguero-Gomez <[email protected]>

## References

Keyfitz, N. (1977) Applied Mathematical Demography. New York: Wiley.

## Examples

 1 2 3 4 5 6 7 8 9 matU <- rbind(c(0.2, 0, 0, 0), c(0.3, 0.4, 0.1, 0), c(0.1, 0.1, 0.2, 0.3), c( 0, 0.2, 0.6, 0.5)) kEntropy(matU, nSteps = 10) kEntropy(matU, nSteps = 20) kEntropy(matU, nSteps = 100) kEntropy(matU, nSteps = 100, trapeze = TRUE)

jonesor/Rage documentation built on May 22, 2019, 1:42 p.m.