make_leslie_matrixR | R Documentation |
Construct a sparse Leslie matrix
make_leslie_matrixR(sx, fx, srb, age_span, fx_idx)
sx |
a vector of survivorship probabilities. |
fx |
a vector of fertility rates, only amongst fertile ages. |
srb |
sex ratio at birth. |
age_span |
the interval for age and projection time step. |
fx_idx |
first in |
The first index of fertility 'fx_idx' must be greater than 1, that is, it is assumed there is no fertility in the youngest age group. The reason for this restriction is that fertility among the youngest age group would require calculation of offspring among births during the second half of the projection interval.
A sparse matrix representation of a Leslie matrix.
library(popReconstruct) data(burkina_faso_females) make_leslie_matrixR(sx = burkina.faso.females$survival.proportions[,1], fx = burkina.faso.females$fertility.rates[4:10, 1], srb = 1.05, age_span = 5, fx_idx = 4)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.