net_vs: Estimate net migration from vital statistics

View source: R/net_vs.R

net_vsR Documentation

Estimate net migration from vital statistics

Description

Estimate net migration from vital statistics

Usage

net_vs(
  .data,
  pop0_col = NULL,
  pop1_col = NULL,
  births_col = "births",
  deaths_col = "deaths"
)

Arguments

.data

A data frame with two rows with the total number of lifetime in- and out-migrants in separate columns. The first row contains totals at the first time point and second row at the second time point.

pop0_col

Character string name of column containing name of initial populations. Default "pop0".

pop1_col

Character string name of column containing name of end populations. Default "pop1".

births_col

Character string name of column containing name of births over the period. Default "births".

deaths_col

Character string name of column containing name of deaths over the period. Default "deaths".

Value

A tibble with additional columns for the population change ('pop_change'), the natural population increase ('natural_inc') and the net migration ('net') over the period.

References

Bogue, D. J., Hinze, K., & White, M. (1982). Techniques of Estimating Net Migration. Community and Family Study Center. University of Chicago.

Examples

library(dplyr)
d <- alabama_1970 %>%
  group_by(race, sex) %>%
  summarise(births = sum(pop_1960[1:2]),
            pop_1960 = sum(pop_1960) - births,
            pop_1970 = sum(pop_1970)) %>%
  ungroup()
d

d %>%
  mutate(deaths = c(51449, 58845, 86880, 123220)) %>%
  net_vs(pop0_col = "pop_1960", pop1_col = "pop_1970")

migest documentation built on Nov. 18, 2023, 9:06 a.m.