View source: R/heaping_indices.R
| spoorenberg | R Documentation |
The Total Modified Whipple Index extends Noumbissi's approach by summing the absolute deviations from 1 for all ten digits, providing an overall measure of age heaping across all terminal digits.
spoorenberg(x, ageMin = 20, ageMax = 64, weight = NULL)
x |
numeric vector of individual ages. |
ageMin |
minimum age to include (default 20). |
ageMax |
maximum age to include (default 64). |
weight |
optional numeric vector of sampling weights. |
Calculate the Total Modified Whipple Index (Wtot) proposed by Spoorenberg.
The index is calculated as:
W_{tot} = \sum_{i=0}^{9} |1 - W_i|
where W_i is Noumbissi's index for digit i.
Interpretation:
0: no heaping (perfect data)
Higher values indicate more heaping
Maximum theoretical value is 16 (if all ages end in one digit)
A single numeric value representing the Total Modified Whipple Index.
Matthias Templ
Spoorenberg, T. and Dutreuilh, C. (2007). Quality of age reporting: extension and application of the modified Whipple's index. Population, 62(4), 729-741.
noumbissi for single-digit index,
whipple for original Whipple's index.
Other heaping indices:
bachi(),
coale_li(),
heaping_indices(),
jdanov(),
kannisto(),
myers(),
noumbissi(),
whipple()
# No heaping
set.seed(42)
age_uniform <- sample(20:64, 10000, replace = TRUE)
spoorenberg(age_uniform) # Should be close to 0
# Strong heaping on 0 and 5
age_heaped <- sample(seq(20, 60, by = 5), 5000, replace = TRUE)
spoorenberg(age_heaped) # Should be high
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.