View source: R/heaping_indices.R
| coale_li | R Documentation |
The Coale-Li index was developed to detect age heaping in populations with high proportions of elderly persons. It compares actual counts at specific ages to smoothed reference values using moving averages.
coale_li(x, digit = 0, ageMin = 60, ageMax = max(x), terms = 5, weight = NULL)
x |
numeric vector of individual ages. |
digit |
integer (0-9) specifying which terminal digit to evaluate (default 0). |
ageMin |
minimum age to include (default 60). |
ageMax |
maximum age to include (default max(x)). |
terms |
number of terms for moving average smoothing (default 5). |
weight |
optional numeric vector of sampling weights. |
Calculate the Coale-Li index for detecting age heaping at older ages.
The method applies double moving averages to create a smooth reference distribution, then calculates the ratio of observed to expected counts for ages ending in a specified digit.
Interpretation:
1.0: no preference for the digit
>1.0: attraction to the digit (heaping)
<1.0: avoidance of the digit
This index is particularly useful for evaluating data quality at older ages (60+) where heaping on round numbers is common.
A single numeric value representing the Coale-Li index.
Matthias Templ
Coale, A. J. and Li, S. (1991). The effect of age misreporting in China on the calculation of mortality rates at very high ages. Demography, 28(2), 293-301.
kannisto for Kannisto's index,
jdanov for Jdanov's index.
Other heaping indices:
bachi(),
heaping_indices(),
jdanov(),
kannisto(),
myers(),
noumbissi(),
spoorenberg(),
whipple()
# Create age data with heaping at older ages
set.seed(42)
age <- c(sample(60:99, 5000, replace = TRUE),
rep(seq(60, 90, by = 10), each = 200)) # Add heaping on 0s
coale_li(age, digit = 0) # Should be > 1
coale_li(age, digit = 5) # Should be closer to 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.