Learn R Programming

migest (version 2.0.4)

index_age: Summary indices of migration age profile

Description

Summary measures of migration age profiles as proposed by Rogers (1975), Bell et. al. (2002), Bell and Muhidin (2009) and Bernard, Bell and Charles-Edwards (2014)

Usage

index_age(
  d = NULL,
  age,
  mi,
  age_min = 5,
  age_max = 65,
  breadth = 5,
  age_col = "age",
  mi_col = "mi",
  long = TRUE
)

Value

A tibble with 8 summary measures where

gmr

Gross migraproduction rate of Rogers (1975)

peak_mi

Peak migration intensities, from Bell et. al. (2002)

peak_age

Corresponding age of peak_mi, from Bell et. al. (2002)

peak_breadth

Breadth of peak, from Bell and Muhidin (2009)

peak_share

Percentage share of peak breadth of all migration, from Bell and Muhidin (2009)

murc

Maximum upward rate of change of Bernard, Bell and Charles-Edwards (2014)

mdrc

Maximum downward rate of change of Bernard, Bell and Charles-Edwards (2014)

asymmetry

Asymmetry between the murc and mudc, from Bernard, Bell and Charles-Edwards (2014)

Arguments

d

Data frame of age specific migration intensities. If used, ensure the correct column names are passed to age_col and mi_col.

age

Numeric vector of ages. Used if d = NULL.

mi

Numeric vector of migration intensities corresponding to each value of age. Used if d = NULL.

age_min

Numeric value for minimum age for peak calculations. Taken as 5 by default.

age_max

Numeric value for maximum age for peak calculations. Taken as 65 by default.

breadth

Numeric value for number of age groups around peak to be used in breadth_peak measure. Default of 5.

age_col

Character string of the age column name (when d is provided)

mi_col

Character string of the migration intensities column name (when d is provided)

long

Logical to return a long data frame with index values all in one column

Examples

Run this code
library(dplyr)
ipumsi_age %>%
  filter(sample == "BRA2000") %>%
  mutate(mi = migrants/population) %>%
  index_age()
  
ipumsi_age %>%
  group_by(sample) %>%
  mutate(mi = migrants/population) %>%
  index_age(long = FALSE)

Run the code above in your browser using DataLab