Smooth population counts in 5-year age groups.

smooth_age_5_arriaga(Value, Age, OAG = TRUE)

Arguments

Value

numeric vector of counts in single, abridged, or 5-year age groups.

Age

numeric vector of ages corresponding to the lower integer bound of the counts.

OAG

logical. Whether or not the top age group is open. Default TRUE.

Value

numeric vector of smoothed counts in 5-year age groups.

Details

The open age group is aggregated down to be evenly divisible by 10. This method accounts for the youngest and oldest age groups. Age classes must be cleanly groupable to 5-year age groups. 10-year age groups are constrained to sum to their original totals.

References

Arriaga EE, Johnson PD, Jamison E (1994). Population analysis with microcomputers, volume 1. Bureau of the Census. Arriaga EE, others (1968). “New life tables for Latin American populations in the nineteenth and twentieth centuries.” New life tables for Latin American populations in the nineteenth and twentieth centuries..

Examples

Ages <- seq(0, 80, by = 5) AMales <- smooth_age_5_arriaga(Value = pop5m_pasex, Age = Ages, OAG = TRUE) # PAS spreadsheet result: Atest <- c(662761, 495126, 345744, 287629, 285919, 261018, 237469, 203277, 161733, 126960, 88586, 67496, 54587, 41257, 28790, 17189, 34729) all(round(AMales) - Atest == 0, na.rm = TRUE)
#> [1] TRUE
if (FALSE) { plot(Ages, pop5m_pasex) lines(as.integer(names(AMales)),AMales) }