ccmpp_r: Cohort-component population projection (R implementation)

Description Usage Arguments Value Author(s) References See Also Examples

View source: R/projection_functions.R

Description

A pure R implementation of the two-sex, female-dominant cohort-component method of population projection (e.g., Preston et. al, 2001, Ch. 6). This is a deterministic method for projecting age-stratified population counts forward in time. It is compatible with the

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
ccmpp_r(
  base_pop_counts,
  surv_props,
  fert_rates,
  srb = matrix(1.05, ncol = proj_steps),
  mig_props,
  proj_steps = ncol(fert_rates),
  age_int = 5,
  label_dims = FALSE,
  base_year = colnames(base_pop_counts[[1]]),
  first_age = 0,
  do_checks = FALSE,
  verbose = FALSE,
  return_list = FALSE
)

Arguments

base_pop_counts

Population counts at baseline. List with up to two components: “female” and “male” each a column vector of age specific counts.

surv_props

List with up to two components: “female” and “male” each a matrix of survivorship proportions: the probability of reaching the age at the start of the interval for each projection interval. Years as columns, ages as rows. The first row should be nL0/(age_int*l0). The last row is survival for age_int years in the open interval.

fert_rates

Matrix of (annual) age-specific fertility rates (NOT yet multiplied by age_int) for each projection interval. Years as columns, ages as rows.

srb

Matrix of sex ratios at birth. Should be of dim 1 * proj_steps.

mig_props

List with up to two components: “female” and “male” each a matrix of age-specific proportions for each projection interval, beginning with baseline. Years as columns, ages as rows.

proj_steps

The number of time periods to project forward.

age_int

Size of projection intervals (years).

label_dims

Should output have dimnames set? (cosmetic).

base_year

Label of baseline year (cosmetic).

first_age

Label of first age group (cosmetic).

do_checks

Logical; check inputs for validity?

verbose

Logical; issue messages (cosmetic)?

return_list

Logical. If female only projection, should a list be returned with one component called “female”?

Value

If isTRUE(return_list), a list with up to two components, “female” and “male”, each a matrix of age-specific population counts, years as columns, ages as rows. Otherwise a matrix of age-specific counts for females only.

Author(s)

Mark Wheldon

References

Preston, S. H., Heuveline, P., and Guillot, M. (2001), Demography: Measuring and Modeling Population Processes, Malden, Massachusetts: Blackwell.

See Also

Other CCMPP backend functions: ccmpp_c()

Examples

1
2
3
4
5
data("Thailand_demog")
with(Thailand_demog, ccmpp_r(thai_base_pop_counts,
                  surv_props = thai_surv_props,
                  fert_rates=thai_fert_rates,
                  srb = thai_srb, mig_props = thai_mig_props))

markalava/CCMPP documentation built on April 29, 2020, 10:53 a.m.