Implementation following the PASEX spreadsheet SINGAGE. Myers' measures preferences for each of the ten possible digits 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.

check_heaping_myers(
  Value,
  Age,
  ageMin = 23,
  ageMax = 82,
  details = FALSE,
  method = "orig"
)

Arguments

Value

numeric. A vector of demographic counts by single age.

Age

numeric. A vector of ages corresponding to the lower integer bound of the counts.

ageMin

integer. The lowest age included in calculations. Default 25.

ageMax

integer. The upper age bound used for calculations. Default 82.

details

logical. Default FALSE. If TRUE, then a list is returned with some relevant parameters.

method

either "orig" or "pasex"

Value

The value of the index.

Details

ageMax is an inclusive upper bound, treated as interval. If you want ages 23 to 82, then give ageMin = 23 and ageMax = 82, not 83 ageMax may be internally rounded down if necessary so that ageMax - ageMin + 1 is evenly divisible by 10. If in doubt, specify details = TRUE, and you can check which ageMax is actually used internally.

References

Myers RJ (1954). “Accuracy of age reporting in the 1950 United States census.” Journal of the American Statistical Association, 49(268), 826--831. Spoorenberg T, Dutreuilh C (2007). “Quality of age reporting: extension and application of the modified Whipple's index.” Population, 62(4), 729--741. United States Census Bureau (2017). “Population Analysis System (PAS) Software.” https://www.census.gov/data/software/pas.html, https://www.census.gov/data/software/pas.html.

Examples

Age <- 0:99 check_heaping_myers(pop1m_pasex, Age, 10, 89)
#> [1] 23.62787
check_heaping_myers(pop1m_pasex, Age, 10, 89, method = "pasex") * 2
#> [1] 47.46004
# pasex 10-89. result: ___ from spreadsheet check_heaping_myers(pop1m_pasex, Age, 23, 82)
#> [1] 29.7444
check_heaping_bachi(pop1m_pasex, Age, 23, 82, method = "orig")
#> [1] 28.93849
check_heaping_bachi(pop1m_pasex, Age, 23, 82, method = "pasex")
#> [1] 28.96891