Implementation following the PASEX spreadsheet SINGAGE, with some extra options for more digit checking. Whipple's index is a summary measure of age heaping on ages ending usually in the digits 0 or 5 used to determine variability in the quality of age reporting between regions or countries and its evolution over time. It assumes a linear distribution of ages in each five-year age range. Digits refer to terminal age digits. For example, 9, 19, 29, etc are all of digit 9.

check_heaping_whipple(Value, Age, ageMin = 25, ageMax = 65, digit = c(0, 5))

Arguments

Value

numeric. A vector of demographic counts by single age.

Age

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

ageMin

integer. The lowest age included in calculations. Default 25.

ageMax

integer. The upper age bound used for calculations. Default 65.

digit

integer. Any digit between 0 and 9. Default c(0,5). Otherwise it needs to be a single digit.

Value

The value of the index.

Details

ageMin and ageMax refer to the bounds of the digits evaluated, which end up in the numerator. ageMax is inclusive. The denominator looks 7 ages lower and 2 ages higher than this range, so these ages must be available. You can get arbitrary W(i) indices by specifying other digits. Note you can only do pairs of digits they are 0 and 5. Otherwise just one digit at a time.

References

Roger G, Waltisperger D, Corbille-Guitton C (1981). Les structures par sexe et âge en Afrique. GDA, Paris, France. United States Census Bureau (2017). “Population Analysis System (PAS) Software.” https://www.census.gov/data/software/pas.html, https://www.census.gov/data/software/pas.html.

Examples

Age <- 0:99 # 2.34,replicates SINGAGE males (w05 <- check_heaping_whipple(pop1m_pasex, Age, 25, 60, digit = c(0,5)))
#> [1] 2.33873
# implements formula from Roger et al. (1981, p. 148) (w0 <- check_heaping_whipple(pop1m_pasex, Age, 25, 60, digit = 0))
#> [1] 2.601614
(w5 <- check_heaping_whipple(pop1m_pasex, Age, 25, 60, digit = 5))
#> [1] 1.786339
# Whipple types check_heaping_whipple(pop1m_pasex, Age, 25, 60, digit = 3)
#> [1] 0.5561028