make_leslie_matrixR: Construct a sparse Leslie matrix

View source: R/RcppExports.R

make_leslie_matrixRR Documentation

Construct a sparse Leslie matrix

Description

Construct a sparse Leslie matrix

Usage

make_leslie_matrixR(sx, fx, srb, age_span, fx_idx)

Arguments

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

Details

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.

Value

A sparse matrix representation of a Leslie matrix.

Examples


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)


mrc-ide/ccmpp.tmb documentation built on May 2, 2022, 12:15 a.m.