index_intensity: Summary indices of migration intensity

Description Usage Arguments Value Source Examples

View source: R/index_intensity.R

Description

Summary indices of migration intensity

Usage

1
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 'mig_total'.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# single year
library(dplyr)
m <- korea_reg %>%
  filter(year == 2020,
         orig != dest) %>%
  pull(flow) %>%
  sum()
m
p <- korea_pop %>%
  filter(year == 2020) %>%
  pull(population) %>%
  sum()
p
index_intensity(mig_total = m, pop_total = p, n = n_distinct(korea_pop$region))

# multiple years
mm <- korea_reg %>%
  group_by(year) %>%
  filter(orig != dest) %>%
  summarise(m = sum(flow))
mm
pp <- korea_pop %>%
  group_by(year) %>%
  summarise(p = sum(population))
pp

library(purrr)
library(tidyr)
mm %>%
  left_join(pp) %>%
  mutate(i = map2(.x = m, .y = p,
                  .f = ~index_intensity(mig_total = .x,
                                        pop_total = .y,
                                        n = n_distinct(korea_pop$region),
                                        long = FALSE))) %>%
  unnest(cols = i)

migest documentation built on July 25, 2021, 9:07 a.m.