one time projection kin. internal function.

timevarying_kin(Ut, ft, pit, ages, pkin, fast = FALSE)

Arguments

Ut

numeric. A matrix of survival probabilities (or ratios).

ft

numeric. A matrix of age-specific fertility rates.

pit

numeric. A matrix with distribution of childbearing.

ages

numeric.

pkin

numeric. A list with kin count distribution in previous year.

fast

logical. If FALSE (the default) the model runs with the original R implementation (dense matrix products in R, output tables assembled with dplyr, tidyr and data.table). If TRUE, the same projections run in compiled C++ code and the output tables are built directly, which is typically 5 to 200 times faster on large inputs (long time series, two-sex, cause-of-death or multistate models). The returned object is identical in both cases: same values, same columns, same row order, same classes. Use fast = TRUE for production runs and fast = FALSE to read or step through the model equations in R.

Value

A list of 14 types of kin matrices (kin age by Focal age) projected one time interval.