Description Usage Arguments Value Author(s) References See Also Examples
View source: R/projection_functions.R
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 calls compiled code to do the actual projection.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ccmpp(
base_pop_counts,
surv_props,
fert_rates,
srb = matrix(1.05, ncol = proj_steps),
mig_props,
proj_steps = ncol(fert_rates),
n_age_grps = length(base_pop_counts$female),
age_int = 5,
label_dims = FALSE,
base_year = colnames(base_pop_counts[[1]]),
first_age = 0,
do_checks = FALSE,
verbose = FALSE,
return_list = FALSE
)
|
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 |
srb |
Matrix of sex ratios at birth. Should be of dim 1 * |
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. |
n_age_grps |
Number of age groups |
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”? |
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.
Mark Wheldon
Preston, S. H., Heuveline, P., and Guillot, M. (2001), Demography: Measuring and Modeling Population Processes, Malden, Massachusetts: Blackwell.
ccmpp_c
which is a bare wrapper for the same underlying _C_ function, and ccmpp_r
which is an implementation in pure R.
1 2 3 4 5 | data("Thailand_demog")
with(Thailand_demog, ccmpp(thai_base_pop_counts,
surv_props = thai_surv_props,
fert_rates=thai_fert_rates,
srb = thai_srb, mig_props = thai_mig_props))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.