one time projection kin. internal function.

timevarying_kin_2sex_cod(
  Ut,
  Ft,
  Ft_star,
  causes,
  pit,
  sex_focal,
  ages,
  pkin,
  fast = FALSE
)

Arguments

Ut

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

Ft

numeric. A matrix of age-specific fertility rates.

Ft_star

numeric. Ft but for female fertility.

causes

integer. Number of causes of death included.

pit

numeric. A matrix with distribution of childbearing.

sex_focal

character. "f" for female or "m" for male.

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, blocked for two sex) projected one time interval.