View source: R/check_heaping.R
check_heaping_myers | R Documentation |
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"
)
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 |
method |
either |
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.
The value of the index.
myers1954accuracyDemoTools \insertRefspoorenberg2007qualityDemoTools \insertRefPASDemoTools
Age <- 0:99
check_heaping_myers(pop1m_pasex, Age, 10, 89)
check_heaping_myers(pop1m_pasex, Age, 10, 89, method = "pasex") * 2
# pasex 10-89. result: ___ from spreadsheet
check_heaping_myers(pop1m_pasex, Age, 23, 82)
check_heaping_bachi(pop1m_pasex, Age, 23, 82, method = "orig")
check_heaping_bachi(pop1m_pasex, Age, 23, 82, method = "pasex")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.