model.RenshawHaberman: The Renshaw-Haberman Mortality Model imported from StMoMo...

Description Usage Arguments Details References See Also Examples

View source: R/model_RenshawHaberman.R

Description

The Renshaw-Haberman mortality model is a Lee-Carter model with cohort effects.

Usage

1
2
3
model.RenshawHaberman(data, x, y, link = c("log", "logit"),
  cohortAgeFun = c("1", "NP"), approxConst = FALSE, radix = 1e+05,
  verbose = FALSE)

Arguments

data

A data.frame or a matrix containing mortality data with ages x as row and time y as column.

x

Numerical vector indicating the ages in input data. Optional. Default: NULL.

y

Numerical vector indicating the years in input data. Optional. Default: NULL.

link

defines the link function and random component associated with the mortality model. "log" would assume that deaths follow a Poisson distribution and use a log link while "logit" would assume that deaths follow a Binomial distribution and a logit link.

cohortAgeFun

defines the cohort age modulating parameter β_x^{(0)}. It can take values: "NP" for a non-parametric age term or "1" for β_x^{(0)}=1 (the default).

approxConst

defines if the approximate identifiability constraint of Hunt and Villegas (2015) is applied or not. If TRUE, the output object is of class rh and subsequent model fitting is performed with fit.rh. If FALSE, the output object is of class StMoMo and subsequent model fitting is performed with fit.StMoMo.

radix

Radix.

verbose

A logical value. Set verbose = FALSE to silent the process that take place inside the function and avoid progress messages.

Details

\insertNoCite

renshaw2006MortalityForecast

References

\insertAllCited

See Also

predict.RenshawHaberman

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
# Data
x  <- 0:89
y  <- 2008:2014
mx <- HMD_male$mx$GBRTENW[paste(x), paste(y)]

# Fit the model
M <- model.RenshawHaberman(data = mx, x = x, y = y)
M
summary(M)

# Check residuals
R <- residuals(M)

plot(R, plotType = "scatter")
plot(R, plotType = "colourmap")
plot(R, plotType = "signplot")

# Forecast
P <- predict(M, h = 5)

mpascariu/MortalityForecast documentation built on Sept. 28, 2020, 2:40 p.m.