This repository includes all codes that implement the age-standardized migration method described in
Welch, Ševčíková, Raftery (2024). Bringing Age Back In: Accounting for Population Age Distribution in Forecasting Migration. Unpublished Manuscript.
Modifications to the bayesPop package are locaated in the bayesPopAge directory of the repository. Codes in the src directory execute all methods described in the manuscript using a combination of bash and R.
Age-standardized migration forecasts were generated with restricted access fertility and mortality files to enhance comparisons to the published WPP 2019 population projections. To generate new forecasts, users must specify (or remove to use default settings) references to the following bayesPopAge pop.predict function input settings:
- tfr.sim.dir
- e0F.sim.dir
- e0M.sim.dir
- migM
- migF
- patterns.
All other data required to execute the age-specific migration forecasting method are publically available within the WPP 2019 or from Abel and Cohen (2019).
Data, results, and log directories are excluded from this repository and need to be initialized prior to executing the pipeline. Here is a high-level summary of the project codes:
bayesPopAge: age-specific net migration implementation
src
├── config.json: simulation settings
├── main.sh: run all scripts 0-4 with config.json from start to end
├── 0-build_gcc_migrant_stocks.R: Construct age-specifict migration forecasting data set
├── 0-build_popflow.R: Construct age-specifict migration forecasting data set
├── 0-build_popflow.sh: Build all data sets for baseline periods 1995-2020
├── 1-fit_intercept_model.R: Fit random intercept model to specified base year for estimation or forecasting
├── 1-fit_intercept_model.sh: Fit random intercept model for each base year and estimation/forecasting combination
├── 2-sample_posterior.R: Fit Azose & Raftery (2015) model to net migration rate data
├── 2-sample_posterior.sh: Sample all migration model configurations
├── 3-manuscript_validation_plots.R: Summarize in-sample forecast results
├── 3-validate_persist.R: Generate validation persistence forecasts starting with 1990-1995 period
├── 3-validate_plots.R: Generate detailed in-sample forecast results for all countries
├── 3-validate_probabilistic.R: Generate in-sample forecasts starting with 1990-1995 period and calculate manuscript rate values
├── 3-validate_summary.R: Generate all validation performance metric tabulations
├── 3-validate.sh: Run all validation pipeline codes
├── 4-forecast_standardized.R: Generate age-specific population forecasts starting with 2020-2025 period
└── 4-forecast.sh: Build all age-specific with and without global net zero balancing and generate all forecast plots