View source: R/kin_time_variant_2sex_cod.R
kin_time_variant_2sex_cod | R Documentation |
Two-sex matrix framework for kin count estimates with varying rates. This produces kin counts grouped by kin, age and sex of each relatives at each Focal´s age. For example, male cousins from aunts and uncles from different sibling's parents are grouped in one male count of cousins. This also produces kin deaths grouped by kin, age, sex of each relatives at each Focal´s age, and cause of death.
kin_time_variant_2sex_cod(
pf = NULL,
pm = NULL,
ff = NULL,
fm = NULL,
Hf = NULL,
Hm = NULL,
sex_focal = "f",
birth_female = 1/2.04,
pif = NULL,
pim = NULL,
nf = NULL,
nm = NULL,
output_cohort = NULL,
output_period = NULL,
output_kin = NULL,
list_output = FALSE
)
pf |
numeric. A vector (atomic) or matrix with probabilities (or survival ratios, or transition between age class in a more general perspective) with rows as ages (and columns as years in case of matrix, being the name of each col the year). |
pm |
numeric. A vector (atomic) or matrix with probabilities (or survival ratios, or transition between age class in a more general perspective) with rows as ages (and columns as years in case of matrix, being the name of each col the year). |
ff |
numeric. Same as pf but for fertility rates. |
fm |
numeric. Same as pm but for fertility rates. |
Hf |
numeric. A list where each list element (being the name of each list element the year) contains a matrix with cause-specific hazards for females with rows as causes and columns as ages, being the name of each col the age. |
Hm |
numeric. A list where each list element (being the name of each list element the year) contains a matrix with cause-specific hazards for males with rows as causes and columns as ages, being the name of each col the age. |
sex_focal |
character. "f" for female or "m" for male. |
birth_female |
numeric. Female portion at birth. This multiplies |
pif |
numeric. For using some specific age distribution of childbearing for mothers (same length as ages). Default |
pim |
numeric. For using some specific age distribution of childbearing for fathers (same length as ages). Default |
nf |
numeric. Same as pf but for population distribution (counts or |
nm |
numeric. Same as pm but for population distribution (counts or |
output_cohort |
integer. Vector of year cohorts for returning results. Should be within input data years range. |
output_period |
integer. Vector of period years for returning results. Should be within input data years range. |
output_kin |
character. kin types to return: "m" for mother, "d" for daughter,... |
list_output |
logical. Results as a list with years elements (as a result of |
See Caswell (2022) for details on formulas.
A data.frame with year, cohort, Focal´s age, related ages, sex and type of kin (for example d
is daughter, oa
is older aunts, etc.), including living and dead kin at that age and sex.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.