Summary indices of migration impact
index_impact(
m,
p,
pop_col = "pop",
reg_col = "region",
orig_col = "orig",
dest_col = "dest",
flow_col = "flow",
long = TRUE
)
A tibble with 4 summary measures where
Migration effectiveness index (MEI) from Shryock et al. (1975). Values range between 0 and 100. High values indicate migration is an efficient mechanism of population redistribution, generating a large net migration. Conversely, low values denote that migration is closely balanced, leading to comparatively little redistribution.
Aggregate net migration rate from Bell et. al. (2002). The population weighted version of mei
.
Index of preference, given in UN DESA (1983). From Bachi (1957) and Shryock et al. (1975) - measures size of migration compared to expected flows based on unifrom migration. Can go from 0 to infinity
Index of velocity, given in UN DESA (1983). From Bogue, Shryock, Jr. & Hoermann (1957) - measures size of migration compared to expected flows based on population size alone. Can go from 0 to infinity
A matrix
or data frame of origin-destination flows. For matrix
the first and second dimensions correspond to origin and destination respectively. For a data frame ensure the correct column names are passed to orig_col
, dest_col
and flow_col
.
A data frame or named vector for the total population. When data frame, column of populations labelled using pop_col
and region names labelled reg_col
.
Character string of the population column name
Character string of the region column name. Must match dimension names or values in origin and destination columns of m
.
Character string of the origin column name (when m
is a data frame rather than a matrix
)
Character string of the destination column name (when m
is a data frame rather than a matrix
)
Character string of the flow column name (when m
is a data frame rather than a matrix
)
Logical to return a long data frame with index values all in one column
# single year
index_impact(
m = subset(korea_reg, year == 2020),
p = subset(korea_pop, year == 2020),
pop_col = "population"
)
# multiple years
library(dplyr)
library(tidyr)
library(purrr)
korea_reg %>%
nest(m = c(orig, dest, flow)) %>%
left_join(korea_pop) %>%
nest(p = c(region, population)) %>%
mutate(i = map2(.x = m, .y = p,
.f = ~index_impact(m = .x, p = .y, pop_col = "population", long = FALSE))) %>%
select(-m, -p) %>%
unnest(i)
Run the code above in your browser using DataLab