index_intensity {migest} | R Documentation |
Summary indices of migration intensity
Description
Summary indices of migration intensity
Usage
index_intensity(mig_total = NULL, pop_total = NULL, n = NULL, long = TRUE)
Arguments
mig_total |
Numeric value for the total number of migrations. |
pop_total |
Numeric value for the total population. |
n |
Numeric value for the number of regions used in the definition of migration for |
long |
Logical to return a long data frame with index values all in one column |
Value
A tibble with 2 summary measures where
cmp |
Crude migration probability from Bell et. al. (2002), sometimes known as crude migration intensity, e.g. Bernard (2017) |
courgeau_k |
Intensity measure of Courgeau (1973) |
Source
Bell, M., Blake, M., Boyle, P., Duke-Williams, O., Rees, P. H., Stillwell, J., & Hugo, G. J. (2002). Cross-national comparison of internal migration: issues and measures. Journal of the Royal Statistical Society: Series A (Statistics in Society), 165(3), 435–464. https://doi.org/10.1111/1467-985X.00247
Courgeau, D. (1973). Migrants et migrations. Population, 28(1), 95–129. https://doi.org/10.2307/1530972
Bernard, A., Rowe, F., Bell, M., Ueffing, P., Charles-Edwards, E., & Zhu, Y. (2017). Comparing internal migration across the countries of Latin America: A multidimensional approach. Plos One, 12(3), e0173895. https://doi.org/10.1371/journal.pone.0173895
Examples
# single year
library(dplyr)
m <- korea_gravity %>%
filter(year == 2020,
orig != dest)
m
p <- korea_gravity %>%
filter(year == 2020) %>%
distinct(dest, dest_pop)
p
index_intensity(mig_total = sum(m$flow), pop_total = sum(p$dest_pop*1e6), n = nrow(p))
# multiple years
library(tidyr)
library(purrr)
mm <- korea_gravity %>%
filter(orig != dest) %>%
group_by(year) %>%
summarise(m = sum(flow))
mm
pp <- korea_gravity %>%
group_by(year) %>%
distinct(dest, dest_pop) %>%
summarise(p = sum(dest_pop)*1e6,
n = n_distinct(dest))
pp
library(purrr)
library(tidyr)
mm %>%
left_join(pp) %>%
mutate(i = pmap(
.l = list(m, p, n),
.f = ~index_intensity(mig_total = ..1, pop_total = ..2,n = ..3, long = FALSE)
)) %>%
unnest(cols = i)