Given a total net migration, calculate the net migration age schedule based on the Rogers and Castro formula for UN families.

mig_un_fam(NM, family, Single = TRUE, OAnew = 100)

Arguments

NM

numeric. Total net migration to distribute between ages and sex.

family

character. Could be "Family", "Female Labor", "Male Labor".

Single

logical. Results by simple age. Default FALSE. Typically from pre-working age and working age parts of in Roger-Castro formula.

OAnew

The age from which to group all ages into an open ended age group. By default it is set to 100, so it groups all ages up to 120, which is the maximum age.

Value

List with

  • params_RC data.frame. Roger-Castro parameters in a data.frame. Same as mig_un_params data.

  • net_migr data.frame. Net migrants by age and sex for the chosen family.

Examples

# 10000 net migrants, comparing two possible families nm1 <- mig_un_fam(NM = 10000, family = "Male Labor", OAnew = 100) nm2 <- mig_un_fam(NM = 10000, family = "Family", OAnew = 100) # See the female profile in for these models: if (FALSE) { plot(nm1$net_migr$age[nm1$net_migr$sex=="Female"], nm1$net_migr$nm[nm1$net_migr$sex=="Female"], xlab="Age",ylab="nm",ylim=c(0,300)) points(nm2$net_migr$age[nm2$net_migr$sex=="Female"], nm2$net_migr$nm[nm2$net_migr$sex=="Female"], col=2) }