ccmpp | R Documentation |
Implements the deterministic female dominant cohort component method of population projection.
ccmpp(
inputs,
settings,
value_col = "value",
assert_positive_pop = TRUE,
validate_arguments = TRUE,
gen_end_interval_col = TRUE
)
inputs |
[ |
settings |
[ |
value_col |
[ |
assert_positive_pop |
[ |
validate_arguments |
[ |
gen_end_interval_col |
[ |
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()
.
[data.table()
] of year-sex-age specific population counts.
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.
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.
Preston, Samuel, Patrick Heuveline, and Michel Guillot. 2001. Demography: Measuring and Modeling Population. Wiley.
leslie_matrix()
vignette("ccmpp")
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)
)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.