Using the digit-specific modified Whipple's index, this index summarizes all age preference and avoidance effects by taking the sum of the absolute differences between digit-specific Whipple's index and 1 (counting all differences as positive).

check_heaping_spoorenberg(Value, Age, ageMin = 20, ageMax = 64)

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.

Value

The value of the index.

Details

ageMin and ageMax are applied to numerator ages, not denominators. Denominators are always 5-year age groups centered on the digit in question, and these therefore stretch into ages a bit higher or lower than the numerator ages. ageMax is an inclusive upper bound, treated as interval. If you want ages 20 to 64, then give ageMin = 20 and ageMax = 64, not 65.

References

Spoorenberg T, Dutreuilh C (2007). “Quality of age reporting: extension and application of the modified Whipple's index.” Population, 62(4), 729--741.

Examples

Age <- 0:99 check_heaping_spoorenberg(pop1m_pasex, Age)
#> [1] 5.066123