coale_li: Coale-Li Age Heaping Index

View source: R/heaping_indices.R

coale_liR Documentation

Coale-Li Age Heaping Index

Description

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.

Usage

coale_li(x, digit = 0, ageMin = 60, ageMax = max(x), terms = 5, weight = NULL)

Arguments

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.

Details

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.

Value

A single numeric value representing the Coale-Li index.

Author(s)

Matthias Templ

References

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.

See Also

kannisto for Kannisto's index, jdanov for Jdanov's index.

Other heaping indices: bachi(), heaping_indices(), jdanov(), kannisto(), myers(), noumbissi(), spoorenberg(), whipple()

Examples

# 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


heaping documentation built on Feb. 10, 2026, 1:08 a.m.