Learn R Programming

IPMpack (version 2.1)

survivorship: Estimates survivorship between two time censuses.

Description

Calculates the fraction of the cohort surviving across age for a chosen starting continuous stage value.

Usage

survivorship(IPMmatrix, loc, maxAge)

Arguments

IPMmatrix
an IPMmatrix object describing growth and survival transitions across stage (e.g. size) and environment.
loc
a starting size location in the IPM matrix for age 1 (i.e., either the index of the desired size in the meshpoints, or, if there are discrete stages, the index + the number of discrete stages; if this is not an integer, then it will be assumed that the rounded version is desired)
maxAge
the maximum age up to which survivorship is desired for or possible.

Value

surv.curv
vector of length maxAge providing survivorship at each age from 1 to maxAge.
stageAgeSurv
matrix of dimensions nBigMatrix*maxAge providing the population structure at every age for a cohort starting with an individual of size size1.
mortality
vector of length maxAge providing mortality at each age from 1 to maxAge.

References

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

Examples

Run this code
# For only continuous stages (e.g. size)
dff <- generateData()
Pmatrix <- makeIPMPmatrix(minSize = min(dff$size, na.rm = TRUE),
maxSize = max(dff$size, na.rm = TRUE), growObj = makeGrowthObj(dff), 
survObj = makeSurvObj(dff))
su <- survivorship(Pmatrix, 1, 300)
plot(su$surv.curv, type = "l", col = "dark gray", ylab = "survivorship", 
xlab= "Continuous (e.g. size) stage", ylim = c(0,1))

# For continuous (e.g. size) and discrete (e.g. seedbank) stages
Pmatrix <- makeCompoundPmatrix(minSize = min(dff$size,na.rm = TRUE),
maxSize = max(dff$size,na.rm = TRUE), envMatrix = makeEnvObj(dff),
growObj = makeGrowthObj(dff, Formula = sizeNext~size+size2+covariate),
survObj = makeSurvObj(dff, Formula = surv~size+size2+covariate), 
discreteTrans = 1)
su <- survivorship(Pmatrix,1,300)

Run the code above in your browser using DataLab