calculate_shares().propop::propop() offers a new method for subregional migration. The new method
uses migration rates rather than net migration (number of people).calculate_rates() and calculate_shares().The computations of the key function propop() are now implemented using data frames
and purrr / dplyr rather than base R matrices. This change makes the computational
steps and intermediate results more accessible and easier to follow. Moreover,
the new tabular approach facilitates the integration of new features. On the
downside, the new approach takes approximately 25% longer to run. The data input
remains unchanged.
While implementing this alternative computation we fixed a minor bug that had a tiny effect on the oldest age group.
The function now offers a new feature: subregional migration can be calculated using rates in addition to using net numbers.
Projection output: The components now include the suffix _n, which more clearly
distinguishes input parameters (e.g. emi_int) from number of people (e.g. emi_nat_n).
New helper functions for propop(): project_population() is a wrapper function;
advance_population() ages the population by one year; calculate_projection()
advances the cohort to the next year; calculate_newborns() computes births.
New tests have been added for propop() and helper functions, as well as for
comparing the output of propop() and propop_legacy(). The comparison is sensitive
to differences larger than three people in total by year 2055 (using data for the
Canton of Aargau).
propop() was renamed to propop_legacy() and was deprecated
together with complement_projection(), create_transition_matrix(),
create_birth_matrix(), create_fertility_matrix(), create_mortality_matrix(),
create_empty_vector() and project_raw(). propop_legacy() and associated
helper function will stay operational.propop::propop() can now perform multiple projection scenarios in a
single run.check_balance to check population equation for each row in
the output of propop::propop() (population at the beginning of the year
plus components must be equal to the population at the end of the year).prepare_evaluation has an additional set of age groups (0-19,
20-39, 40-59, 60-79, 80 years and older). The output that is created by this
function can be used by compute_measures and aggregate_measures
to evaluate projection models against a benchmark.get_population: Using clearer, more intuitive name for argument to specify
start year; less typing for users;calculate_shares to distribute FSO estimates expressed as
"number of people" among sub-cantonal entitities (e.g., immigration to
municipalities).prepare_evaluation() by offering possibility to
indicate which column contains the population (rather than assuming it's
called n).propop::propop() now uses separate input parameters for emigration to /
immigration from other cantons. Previously propop::propop() used the net
difference between emigration to / immigration from other cantons.propop::propop() returns a plain text feedback in the console summarizing
the settings used to run the projection.The propop package is a successor of staagBevProj (not publicly available),
which was last updated in December 2022. staagBevProj was developed by
Tina Cornioley, Jan Wunder, and Niklas Haffert. As head of Official Statistics
Aargau, Andrea Plüss supported
the devlopment as well as the
publication of staagBevProj and propop.
propop was developed by Norah Efosa and Adrian Gadient
(Statistik Aargau).
The main innovations are:
projectPop and
projectAll)