View source: R/IPMpack-Analyses.r
survivorship | R Documentation |
Calculates the fraction of the cohort surviving across age for a chosen starting continuous stage value.
survivorship(IPMmatrix, loc, maxAge)
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. |
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. |
C. Jessica E. Metcalf, Sean M. McMahon, Roberto Salguero-Gomez, Eelke Jongejans & Cory Merow.
Tuljapurkar & Horvitz. 2006. From stage to age in variable environments. Life expectancy and survivorship. Ecology 87, p1497-1509.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.