myers: Myers' Blended Index of Age Heaping

View source: R/heaping_indices.R

myersR Documentation

Myers' Blended Index of Age Heaping

Description

Myers' index measures preferences for each of the ten possible terminal digits (0-9) as a blended index. It is based on the principle that in the absence of age heaping, the aggregate population of each age ending in one of the digits 0 to 9 should represent 10 percent of the total population.

Usage

myers(x, ageMin = 23, ageMax = 82, weight = NULL)

Arguments

x

numeric vector of individual ages.

ageMin

minimum age to include (default 23).

ageMax

maximum age to include (default 82).

weight

optional numeric vector of sampling weights.

Details

Calculate Myers' blended index to measure digit preference in age data.

The index uses a blending technique that weights earlier ages more for digit preference calculation and later ages more for avoidance, creating a balanced measure across the age range.

The theoretical range is 0 to 90:

  • 0: no digit preference (perfect data)

  • 90: all ages reported with same terminal digit (maximum heaping)

Value

A single numeric value representing Myers' blended index.

Author(s)

Matthias Templ

References

Myers, R. J. (1940). Errors and bias in the reporting of ages in census data. Transactions of the Actuarial Society of America, 41, 395-415.

Myers, R. J. (1954). Accuracy of age reporting in the 1950 United States Census. Journal of the American Statistical Association, 49(268), 826-831.

See Also

bachi for Bachi's index, whipple for Whipple's index.

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

Examples

# No heaping (uniform ages)
set.seed(42)
age_uniform <- sample(23:82, 10000, replace = TRUE)
myers(age_uniform)  # Should be close to 0

# Strong heaping on ages ending in 0 or 5
age_heaped <- sample(seq(25, 80, by = 5), 5000, replace = TRUE)
myers(age_heaped)  # Should be high


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