check_heaping_spoorenberg: Spoorenberg's total modified Whipple index

View source: R/check_heaping.R

check_heaping_spoorenbergR Documentation

Spoorenberg's total modified Whipple index

Description

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).

Usage

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.

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.

Value

The value of the index.

References

\insertRef

spoorenberg2007qualityDemoTools

Examples

Age <- 0:99
check_heaping_spoorenberg(pop1m_pasex, Age)

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