This age heaping index is used for particular old ages, such as 90, 95, 100, 105, and so forth.

check_heaping_kannisto(Value, Age, Agei = 90, pow = "exp")

Arguments

Value

numeric. A vector of demographic counts or rates by single age.

Age

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

Agei

integer. The age on which the index is centered.

pow

either "exp" (default) or a power such as 2. See details

Value

The value of the index.

Details

The index looks down two ages and up two ages, so the data must accommodate that range. The denominator is a mean of the counts in the surrounding 5 single ages. The kind of mean can be controlled with the pow argument. By default, this takes the antilog of the arithmetic mean of the natural log of the five denominator counts. That will fail if one of the counts is equal to 0. In such cases, another power, such as 2 or 10 or 100 may be used, which is more robust to 0s. The higher the power, the closer the result will resemble the default output. If pow=="exp" but a 0 is detected among the denominator ages, then pow is assigned a value of 1000. pow=1 would imply an arithmetic mean in the denominator.

References

Kannisto V (1999). “Assessing the information on age at death of old persons in national vital statistics.” Validation of Exceptional Longevity'', Odense Monographs on Population Aging, 6, 235--249.

Examples

Age <- 0:99 check_heaping_kannisto(pop1m_pasex, Age, 90)
#> [1] 10.61044
check_heaping_kannisto(pop1m_pasex, Age, 95)
#> [1] 11.89005
check_heaping_kannisto(pop1m_pasex, Age, 95, pow = 2) # geometric mean in denom
#> [1] 7.20897
check_heaping_kannisto(pop1m_pasex, Age, 95, pow = 1000) # similar, but robust to 0s
#> [1] 11.88047
check_heaping_kannisto(pop1m_pasex, Age, 95, pow = 1) # arithmetic mean in denom
#> [1] 4.198132
pop1m_pasex[Age==95] / mean(pop1m_pasex[Age >= 93 & Age <= 97])
#> [1] 4.198132