check_heaping_whipple: Calculate Whipple's index of age heaping

View source: R/check_heaping.R

check_heaping_whippleR Documentation

Calculate Whipple's index of age heaping

Description

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.

Usage

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.

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.

Value

The value of the index.

References

\insertRef

GDA1981IREDADemoTools \insertRefPASDemoTools

Examples

 Age <- 0:99
# 2.34,replicates SINGAGE males
 (w05 <- check_heaping_whipple(pop1m_pasex, Age, 25, 60, digit = c(0,5)))

 # implements formula from Roger et al. (1981, p. 148)
 (w0 <- check_heaping_whipple(pop1m_pasex, Age, 25, 60, digit = 0))
 (w5 <- check_heaping_whipple(pop1m_pasex, Age, 25, 60, digit = 5))

 # Whipple types
 check_heaping_whipple(pop1m_pasex, Age, 25, 60, digit = 3)

timriffe/DemoTools documentation built on Jan. 28, 2024, 5:13 a.m.