Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

life_expect

Calculate mean and variance of life expectancy from a matrix population model


Description

Applies Markov chain approaches to obtain mean and variance of life expectancy from a matrix population model (MPM).

Usage

life_expect_mean(matU, start = 1L)

life_expect_var(matU, start = 1L)

life_expect(matU, start = 1L)

Arguments

matU

The survival component of a MPM (i.e. a square projection matrix reflecting survival-related transitions; e.g. progression, stasis, and retrogression). Optionally with named rows and columns indicating the corresponding life stage names.

start

The index (or stage name) of the first stage of the life cycle which the user considers to be the beginning of life. Defaults to 1. Alternately, a numeric vector giving the starting population vector (in which case length(start) must match ncol(matU)). See section Starting from multiple stages.

Value

Returns life expectancy. If matU is singular (often indicating infinite life expectancy), returns NA.

Starting from multiple stages

Rather than specifying argument start as a single stage class from which all individuals start life, it may sometimes be desirable to allow for multiple starting stage classes. For example, if the user wants to start their calculation of life expectancy from reproductive maturity (i.e. first reproduction), they should account for the possibility that there may be multiple stage classes in which an individual could first reproduce.

To specify multiple starting stage classes, specify argument start as the desired starting population vector (n1), giving the proportion of individuals starting in each stage class (the length of start should match the number of columns in the relevant MPM).

See function mature_distrib for calculating the proportion of individuals achieving reproductive maturity in each stage class.

Author(s)

Roberto Salguero-Gomez <rob.salguero@zoo.ox.ac.uk>

Hal Caswell <hcaswell@whoi.edu>

References

Caswell, H. 2001. Matrix Population Models: Construction, Analysis, and Interpretation. Sinauer Associates; 2nd edition. ISBN: 978-0878930968

See Also

Other life history traits: entropy_d(), entropy_k(), gen_time(), longevity(), net_repro_rate(), repro_maturity, shape_rep(), shape_surv()

Examples

data(mpm1)

# mean life expectancy starting from stage class 2 
life_expect_mean(mpm1$matU, start = 2)
life_expect_mean(mpm1$matU, start = "small")  # equivalent using named life stages

# mean life expectancy starting from first reproduction
rep_stages <- repro_stages(mpm1$matF)
n1 <- mature_distrib(mpm1$matU, start = 2, repro_stages = rep_stages)
life_expect_mean(mpm1$matU, start = n1)

# variance of life expectancy from stage class 2
life_expect_var(mpm1$matU, start = 1)

Rage

Life History Metrics from Matrix Population Models

v1.0.0
GPL-3
Authors
Patrick Barks [aut] (<https://orcid.org/0000-0002-5947-8151>), Danny Buss [ctb], Pol Capdevila [aut] (<https://orcid.org/0000-0002-2842-4302>), Hal Caswell [aut] (<https://orcid.org/0000-0003-4394-6894>), Judy P. Che-Castaldo [aut] (<https://orcid.org/0000-0002-9118-9202>), John Jackson [aut] (<https://orcid.org/0000-0002-4563-2840>), Tamora James [aut] (<https://orcid.org/0000-0003-1363-4742>), Owen Jones [aut, cre] (<https://orcid.org/0000-0001-5720-4686>), Sam Levin [aut] (<https://orcid.org/0000-0002-3289-9925>), William K. Petry [aut] (<https://orcid.org/0000-0002-5230-5987>), Roberto Salguero-Gomez [aut] (<https://orcid.org/0000-0002-6085-4433>), Caroline Schuette [ctb] (<https://orcid.org/0000-0002-2063-8736>), Iain Stott [aut] (<https://orcid.org/0000-0003-2724-7436>), Chelsea C. Thomas [aut] (<https://orcid.org/0000-0002-8155-9353>)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.