kannisto.predict: Kannisto Prediction

Description Usage Arguments Details Value References See Also Examples

View source: R/kannisto.R

Description

Given estimated Kannisto parameters (coherent or original), it predicts mortality rates for given ages.

Usage

1
kannisto.predict(pars, ages)

Arguments

pars

A named vector with Kanisto coefficients c and d (e.g. result of kannisto.estimate or cokannisto.estimate).

ages

A vector of ages to make prediction for. These can be indices of age groups or raw ages, but on the same scale as used in the estimation.

Details

Given parameters c and d in pars, the function uses the Kannisto equation logit(mx) = log(c) + dx, to predict mortality rates for age groups x given by ages.

Value

Vector of predicted mortality rates.

References

Thatcher, A. R., Kannisto, V. and Vaupel, J. W. (1998). The Force of Mortality at Ages 80 to 120, volume 5 of Odense Monographs on Population Aging Series. Odense, Denmark: Odense University Press.

See Also

cokannisto, kannisto.estimate, cokannisto.estimate

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
data(mxM, mxF, package = "wpp2017")
mxm <- subset(mxM, name == "Germany")[,"2010-2015"]
ages <- c(0, 1, seq(5, 130, by=5))

# using original Kannisto parameters
pars <- kannisto.estimate(mxm[18:21], ages = ages[18:21])
mxm.pred <- kannisto.predict(pars$coefficients, ages = ages[22:28])
plot(ages, c(mxm[1:21], mxm.pred), type="l", log="y", 
    xlab="age", ylab="mx")
    
# Coherent Kannisto
mxf <- subset(mxF, name == "Germany")[,"2010-2015"]
copars <- cokannisto.estimate(
   mxm[18:21], mxf[18:21], ages = ages[18:21])
cmxm.pred <- kannisto.predict(copars[["male"]]$coefficients, ages = ages[22:28])
cmxf.pred <- kannisto.predict(copars[["female"]]$coefficients, ages = ages[22:28])
plot(ages, c(mxm[1:21], cmxm.pred), type="l", log="y", 
    xlab="age", ylab="mx", col="blue")
lines(ages, c(mxf[1:21], cmxf.pred), col="red")

PPgp/MortCast documentation built on Aug. 8, 2021, 5:17 p.m.