Description Usage Arguments Details Value Examples
Make the initial values for a demographic account consisting of population, deaths, and births
1 | make_account(popn, mort_rates, fert_rates, time_start, time_end)
|
popn |
A |
mort_rates |
A |
fert_rates |
A |
time_start |
The first year for the account. |
time_end |
The last year for the account. |
The account will not typically be consistent -
that is, the demographic accounting equations will
not typically be satisfied. The account can be
made consistent using function makeConsistent
.
If Lx
and propn_age_fert
use 5-year time
steps, then time_end - time_start
should be a
multiple of 5.
If popn
, mort_rates
, or fert_rates
do not have a time dimension, make_account
adds one.
A
DemographicAccount
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | Lx <- dembase::Counts(Lx_west[ , , 20])
mort_rates <- dembase::Values(mx_west[ , , , 20])
propn_age_fert <- dembase::Values(propn_age_fert_booth)
popn <- make_stationary_popn(popn_size = 100,
Lx = Lx,
sex_ratio = 105,
time_start = 1000,
time_end = 1020)
fert_rates <- make_stationary_fert_rates(Lx = Lx,
propn_age_fert = propn_age_fert,
sex_ratio = 105)
account <- make_account(popn = popn,
mort_rates = mort_rates,
fert_rates = fert_rates,
time_start = 1000,
time_end = 1020)
dembase::summary(account)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.