projection | R Documentation |
Estimates the components of the projection matrix and constructs the matrix given data on fecundity and survival in a age-structured population.
procomp(a, uage) promat(pc, nage)
a |
a data set with fecundity and survival of individuals with known age over several years. Each individual can be represented once a year. |
uage |
the unique age classes in the data set. |
pc |
a matrix with columns age, fecundity and survival, i.e. the output from
running the function |
nage |
the number of unique age classes in the data set. |
This function was made for internal use in lmf
, but can be applied as a
standalone.
The data set needs to contain the columns recruits (number of female offspring), survival (1 if the individual survives to the next reproductive event and 0 if it dies) and age.
The contruction of the projection matrix is divided into two functions for ease of storing and handling the estimates.
procomp
returns a matrix with the components of the projection matrix having
columns age, fecundity and survival, while promat
takes the output from
procomp
and returns the projection matrix.
Thomas Kvalnes
Caswell, H. 2000. Matrix Population Models, 2nd edn. Sinauer, Sunderland, Massachusetts. Engen, S., Saether, B.-E., Kvalnes, T. and Jensen, H. 2012. Estimating fluctuating selection in age-structured populations. Journal of Evolutionary Biology, 25, 1487-1499.
eigenl
#Data set from Engen et al. 2012 data(sparrowdata) #The uniue age classes unique.age <- unique(sparrowdata$age) #Estimate the components of the projection matrix projection.components <- procomp(a = sparrowdata, uage = unique.age) #View components projection.components #Set up the projection matrix promat(pc = projection.components, nage = length(unique.age))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.