varLifeExpect: Calculates variation in life expectancy in a discretely...

View source: R/IPMpack-Analyses.r

varLifeExpectR Documentation

Calculates variation in life expectancy in a discretely stochastic environment.

Description

Provided a P matrix, defining survival transitions across size, this function provides a vector with variance in life expectancy in units of the time-step used, for each of the size bins.

Usage

varLifeExpect(IPMmatrix)

Arguments

IPMmatrix

an IPMmatrix object defining survival transitions.

Value

a vector of variance in life expectancies each corresponding to Pmatrix@meshpoints.

Author(s)

C. Jessica E. Metcalf, Sean M. McMahon, Roberto Salguero-Gomez, Eelke Jongejans & Cory Merow.

References

Caswell, 2001. Matrix population models: analysis, construction and interpretation. 2nd ed. Sinauer. p110-132.

Cochran & Ellner. 1995. Simple methods for calculating age-based life history parameters for stage-structured populations. Ecological Monographs 62, p345-364.

Tuljapurkar & Horvitz, 2006. From stage to age in variable environments. Life expectancy and survivorship. Ecology 87, p1497-1509.

See Also

meanLifeExpect, makeIPMPmatrix

Examples

# With a single continuous (e.g. size) stage
dff <- generateData()
Pmatrix <- makeIPMPmatrix(minSize = min(dff$size, na.rm = TRUE), 
maxSize = max(dff$size, na.rm = TRUE), growObj = makeGrowthObj(dff), 
survObj = makeSurvObj(dff))
vle <- varLifeExpect(Pmatrix)

plot(Pmatrix@meshpoints, vle, ylab = "Variation life expectancy", 
xlab = "Continuous (e.g. size) stage", type = "l", ylim = c(0,max(vle)))



wpetry/IPMpack2 documentation built on Sept. 29, 2022, 9:41 a.m.