View source: R/heaping_indices.R
| heaping_indices | R Documentation |
This function calculates all available heaping indices for a given age vector, providing a comprehensive assessment of data quality.
heaping_indices(x, weight = NULL)
x |
numeric vector of individual ages. |
weight |
optional numeric vector of sampling weights. |
Convenience function to calculate multiple heaping indices at once.
A named list with all heaping indices:
Standard Whipple index (100 = no heaping)
Modified Whipple index (0 = no heaping)
Myers' blended index (0 = no heaping)
Bachi's index (0 = no heaping)
Total Modified Whipple index (0 = no heaping)
Noumbissi's index for digit 0 (1 = no heaping)
Noumbissi's index for digit 5 (1 = no heaping)
Matthias Templ
Other heaping indices:
bachi(),
coale_li(),
jdanov(),
kannisto(),
myers(),
noumbissi(),
spoorenberg(),
whipple()
set.seed(42)
# Uniform ages (no heaping)
age_uniform <- sample(20:70, 10000, replace = TRUE)
heaping_indices(age_uniform)
# Heaped ages
age_heaped <- sample(seq(20, 70, by = 5), 5000, replace = TRUE)
heaping_indices(age_heaped)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.