leslie.row1 {demogR} | R Documentation |
leslie.row1
Description
A utility for calculating the first row of a Leslie matrix from vectors of interval survival probabilities and age-specific fertility rates.
Usage
leslie.row1(mx, px, L = NULL, SRB = 1.05, peryear = 5, one.sex = TRUE)
Arguments
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 |
Details
Calculates the first-row entries for a Leslie matrix. This utility is particularly useful for constructing simulated Leslie matrices.
Value
A vector of length k, where k is the rank of the projection matrix A.
See Also
Examples
## 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