Description Usage Arguments Details Value See Also Examples
A utility for calculating the first row of a Leslie matrix from vectors of interval survival probabilities and age-specific fertility rates.
1 | leslie.row1(mx, px, L = NULL, SRB = 1.05, peryear = 5, one.sex = TRUE)
|
mx |
vector of age-specific fertilities (length=k) |
px |
vector of interval survival probabilities (length=k-1) |
L |
person-years lived in the first interval; default
|
SRB |
sex ratio at birth; default |
peryear |
width of the age-class/projection interval |
one.sex |
should each element be reduced by a factor
1/(1+SRB)? default |
Calculates the first-row entries for a Leslie matrix. This utility is particularly useful for constructing simulated Leslie matrices.
A vector of length k, where k is the rank of the projection matrix A.
1 2 3 4 5 6 7 8 9 10 11 | ## simulate survival values from a beta(9,1) distribution
px <- rbeta(10,9,1)
## simulate fertility values from a gamma(2,10) distribution with age
## at first reproduction = 10
mx <- c(0,0,0,rgamma(8,2,10))
A <- odiag(px,-1)
Fx <- leslie.row1(mx,px)
A[1,] <- Fx
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.