Skip to content

cottierf/ACMI_frontiers_replication

Repository files navigation

ACMI_frontiers_replication

This github repository contains the replication files for the article titled `Projecting Future Migration with Bayesian Hierarchical Gravity: Models of Migration: An application to Africa' published in Frontiers in Climate (2024).

Clone this repository

To clone this repository use the following command:

git clone https://github.com/cottierf/ACMI_frontiers_replication

Replications

To replicates the analyses, tables and figures presented in the article and the appendix, users should run the R scripts in root folder in the numerical order indicated starting with "1_calibration_main.R".

The scripts were prepared using R v.4.2.2

Repository architecture

ACMI_frontiers_replication/
├── data/ [contains the input data]
│ ├── calibration_data.Rds
│ ├── projection_data.Rds
│ ├── CEPII_Gravity_V202211_addVars.csv
├── stan_output/ [stores the stan model files]
│ ├── loo_cv/ \ [stores the stan loo cv files]
├── projections/ [stores the projection results]
├── tables/ [stores the tables generated from the analysis]
├── figures/ [stores the figures generated from the analysis]
├── utils/ [contains R utility functions]
├── README.md
├── 1_calibration_main.R
├── 2_proj_main.R
├── 3_tables_main.R
├── 4_figures_main.R
├── 5_calibration_appendix.R
├── 6_tables_appendix.R
├── 7_figures_appendix.R

R environment

To replicate the analyses presented in the article. You need a number of R packages available on cran. To install these packages simply run the following commands in R:

install.packages("readr")
install.packages("dplyr")
install.packages("tidyr")
install.packages("glue")
install.packages("rstan")
install.packages("brms")
install.packages("loo")
install.packages("ggplot2")
install.packages("bayesplot")
install.packages("BayesPostEst")
install.packages("fastDummies")
install.packages("countrycode")
install.packages("stargazer")
install.packages("cowplot")
install.packages("gridExtra")

citation

Cottier, F. (2024). Projecting Future Migration with Bayesian Hierarchical Gravity Models of Migration: An application to Africa. Frontiers in Climate, 6, 1384295. https://doi.org/10.3389/fclim.2024.1384295

version history

v1.0: public release (12/18/2024)

About

Replication data for frontiers article

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages