ccmpp: Cohort Component Method of Population Projection (CCMPP)

View source: R/ccmpp.R

ccmppR Documentation

Cohort Component Method of Population Projection (CCMPP)

Description

Implements the deterministic female dominant cohort component method of population projection.

Usage

ccmpp(
  inputs,
  settings,
  value_col = "value",
  assert_positive_pop = TRUE,
  validate_arguments = TRUE,
  gen_end_interval_col = TRUE
)

Arguments

inputs

[list()]
[data.table()] for each ccmpp input. Requires 'srb', 'asfr', 'baseline'; mortality estimates provided as just 'survival' or two of 'mx', 'ax', and 'qx'; and migration estimates provided as just 'net_migration' or both 'immigration' and 'emigration'. See Section: Inputs for more information on each of the required inputs.

settings

[list()]
Named list of settings for running ccmpp() with. See Section: Settings for more information on each of the required settings.

value_col

[character(1)]
Name of the column containing the value of interest in each of the inputs. Default is 'value'.

assert_positive_pop

[logical(1)]
Whether or not to check that the projected population estimates are all greater than or equal to zero. Default is 'TRUE'.

validate_arguments

[logical(1)]
Whether to validate that the input arguments are formatted correctly. Default is 'TRUE'.

gen_end_interval_col

[logical(1)]
Whether to automatically generate the end of the interval columns (like 'age'). Default is 'TRUE'.

Details

Given information on the starting population size, the population at later time points is a function of mortality, fertility, sex-ratio at birth, and net-migration.

The cohort component method of population projection (CCMPP) projects a sex-age specific population forward in time using leslie matrices leslie_matrix() which encode information about fertility, sex-ratio at birth, and mortality.

Population(t + \delta) = Leslie[t, t + \delta] * Population(t)

See vignette("ccmpp", package = "demCore") or linked references for more details on this method.

For mortality related inputs, supplying 'survival' only, or two or more of 'mx', 'qx', and 'ax' is possible. When 'mx', 'qx', and 'ax' parameters are given then the function calculates the survivorship ratio with nSx_from_lx_nLx_Tx().

Value

[data.table()] of year-sex-age specific population counts.

Inputs

srb: [data.table()]

  • year_start: [integer()] start of the calendar year interval (inclusive). Corresponds to 'years' setting.

  • year_end: [integer()] end of the calendar year interval (exclusive).

  • value_col: [numeric()] sex-ratio at birth estimates, must be greater than zero.

asfr: [data.table()]

  • year_start: [integer()] start of the calendar year interval (inclusive). Corresponds to 'years' setting.

  • year_end: [integer()] end of the calendar year interval (exclusive).

  • age_start: [integer()] start of the age group (inclusive). Corresponds to 'ages_asfr' setting.

  • age_end: [integer()] end of the age group (exclusive).

  • value_col: [numeric()] annual age-specific fertility rate estimates, must be greater than zero.

baseline: [data.table()]

  • year: [integer()] mid-year for population estimate. Corresponds to 'years' setting.

  • sex: [character()] either 'female' or 'male'. Corresponds to 'sexes' setting.

  • age_start: [integer()] start of the age group (inclusive). Corresponds to 'ages' setting.

  • age_end: [integer()] end of the age group (exclusive).

  • value_col: [numeric()] baseline year population count estimates, must be greater than zero.

survival: [data.table()]

  • year_start: [integer()] start of the calendar year interval (inclusive). Corresponds to 'years' setting.

  • year_end: [integer()] end of the calendar year interval (exclusive).

  • sex: [character()] either 'female' or 'male'. Corresponds to 'sexes' setting.

  • age_start: [integer()] start of the age group (inclusive). Corresponds to 'ages_mortality' setting.

  • age_end: [integer()] end of the age group (exclusive).

  • value_col: [numeric()] survivorship ratio estimates, must be greater than zero and less than one.

mx: [data.table()]

  • year_start: [integer()] start of the calendar year interval (inclusive). Corresponds to 'years' setting.

  • year_end: [integer()] end of the calendar year interval (exclusive).

  • sex: [character()] either 'female' or 'male'. Corresponds to 'sexes' setting.

  • age_start: [integer()] start of the age group (inclusive). Corresponds to 'ages_mortality' setting.

  • age_end: [integer()] end of the age group (exclusive).

  • value_col: [numeric()] mortality rate estimates, must be greater than zero.

ax: [data.table()]

  • year_start: [integer()] start of the calendar year interval (inclusive). Corresponds to 'years' setting.

  • year_end: [integer()] end of the calendar year interval (exclusive).

  • sex: [character()] either 'female' or 'male'. Corresponds to 'sexes' setting.

  • age_start: [integer()] start of the age group (inclusive). Corresponds to 'ages_mortality' setting.

  • age_end: [integer()] end of the age group (exclusive).

  • value_col: [numeric()] average years lived by those dying in the interval estimates, must be greater than zero and less than the age interval length.

qx: [data.table()]

  • year_start: [integer()] start of the calendar year interval (inclusive). Corresponds to 'years' setting.

  • year_end: [integer()] end of the calendar year interval (exclusive).

  • sex: [character()] either 'female' or 'male'. Corresponds to 'sexes' setting.

  • age_start: [integer()] start of the age group (inclusive). Corresponds to 'ages_mortality' setting.

  • age_end: [integer()] end of the age group (exclusive).

  • value_col: [numeric()] probability of death estimates, must be greater than zero and less than one.

net_migration: [data.table()]

  • year_start: [integer()] start of the calendar year interval (inclusive). Corresponds to 'years' setting.

  • year_end: [integer()] end of the calendar year interval (exclusive).

  • sex: [character()] either 'female' or 'male'. Corresponds to 'sexes' setting.

  • age_start: [integer()] start of the age group (inclusive). Corresponds to 'ages' setting.

  • age_end: [integer()] end of the age group (exclusive).

  • value_col: [numeric()] annual net-migration proportion estimates.

immigration: [data.table()]

  • year_start: [integer()] start of the calendar year interval (inclusive). Corresponds to 'years' setting.

  • year_end: [integer()] end of the calendar year interval (exclusive).

  • sex: [character()] either 'female' or 'male'. Corresponds to 'sexes' setting.

  • age_start: [integer()] start of the age group (inclusive). Corresponds to 'ages' setting.

  • age_end: [integer()] end of the age group (exclusive).

  • value_col: [numeric()] annual immigration proportion estimates, must be greater than zero.

emigration: [data.table()]

  • year_start: [integer()] start of the calendar year interval (inclusive). Corresponds to 'years' setting.

  • year_end: [integer()] end of the calendar year interval (exclusive).

  • sex: [character()] either 'female' or 'male'. Corresponds to 'sexes' setting.

  • age_start: [integer()] start of the age group (inclusive). Corresponds to 'ages' setting.

  • age_end: [integer()] end of the age group (exclusive).

  • value_col: [numeric()] annual emigration proportion estimates, must be greater than zero.

Settings

  • years: [numeric()]
    The start of each calendar year interval to project in ccmpp(). Corresponds to the 'year_start' column in each of the year-specific inputs.

  • sexes: [character()]
    The sexes being projected in ccmpp(), must be either just 'female', or 'female' and 'male'. Corresponds to the 'sex' column in each of the sex-specific inputs.

  • ages: [numeric()]
    The ages being projected in ccmpp(). Corresponds to the 'age_start' column in each of the standard age-specific inputs.

  • ages_mortality: [numeric()]
    The ages for which mortality parameter estimates are available. Must either be equivalent to 'ages' or include one extra older age group. See the vignette for the approximation made when 'ages = ages_mortality'. Corresponds to the 'age_start' column in the mortality [data.table()] input(s).

  • ages_asfr: [numeric()]
    The assumed female reproductive ages, subset of 'ages'. Corresponds to the 'age_start' column in the age-specific fertility rate (asfr) [data.table()] input.

References

Preston, Samuel, Patrick Heuveline, and Michel Guillot. 2001. Demography: Measuring and Modeling Population. Wiley.

See Also

leslie_matrix()

vignette("ccmpp")

Examples

population <- ccmpp(
  inputs = thailand_initial_estimates,
  settings = list(
    years = seq(1960, 1995, 5),
    sexes = c("female", "male"),
    ages = seq(0, 80, 5),
    ages_mortality = seq(0, 85, 5),
    ages_asfr = seq(15, 45, 5)
  )
)


ihmeuw-demographics/demCore documentation built on Feb. 24, 2024, 11:05 p.m.