Last chance! 50% off unlimited learning
Sale ends in
lca.rh(dat, year = dat$year, age = dat$age, series = 1, max.age = 100,
dec.conv = 6, clip = 3, error = c("poisson", "gaussian"),
model = c("m", "h0", "h1", "h2", "ac", "lc"), restype = c("logrates", "rates", "deaths", "deviance"), scale = F, interpolate = F, verbose = T, spar = NULL)
demogdata
classlogrates
and rates
the function returns as fitted values the log and untransformed mortality rates, respectively. Likewise, the choices of deaths
and deviance
correspond to the fitted number of deathslca
) dat
argument by interpolation across calendar years (see also smooth.demogdata
)lca
)Renshaw, A. E. and Haberman, S. (2003b), ``Lee-Carter mortality forecasting with age specific enhancement", Insurance: Mathematics and Economics, 33, 255-272.
Renshaw, A. E. and Haberman, S. (2006), ``A cohort-based extension to the Lee-Carter model for mortality reduction factors", Insurance: Mathematics and Economics, 38, 556-570.
Renshaw, A. E. and Haberman, S. (2008), ``On simulation-based approaches to risk measurement in mortality with specific reference to Poisson Lee-Carter modelling", Insurance: Mathematics and Economics, 42(2), 797-816.
Renshaw, A. E. and Haberman, S. (2009), ``On age-period-cohort parametric mortality rate projections", Insurance: Mathematics and Economics, 45(2), 255-270.
dd.rfp
, elca.rh
, lca
# standard LC model with Gaussian errors (corresponding to SVD graduation):
# correct 0 or missing mortality rates before graduation
mod6g <- lca.rh(dd.cmi.pens, mod='lc', error='gauss', max=110, interpolate=TRUE)
# AP LC model with Poisson errors
mod6p <- lca.rh(dd.cmi.pens, mod='lc', error='pois', interpolate=TRUE)
# Model Summary, Coefficients and Plotting:
mod6p; coef(mod6p); plot(mod6p)
# Comparison with standard fitting method
# Standard LC model (with Gaussian errors) - SVD fit (demography package)
modlc <- lca(dd.cmi.pens, interp=TRUE, adjust='none')
# Gaussian (SVD) - Gaussian (iterative)
round(modlc$ax-mod6g$ax, 4)
round(modlc$bx-mod6g$bx, 4)
round(modlc$kt-mod6g$kt, 4)
# -------------------------------------------------- #
# APC LC model fitted to restricted age range with 'deviance' residuals
# the remaining 0/NA values reestimated:
# WARNING: for proper fit recommend dec=6, but it can lead to slow convergence!
mod1 <- lca.rh(dd.cmi.pens, age=60:100, mod='m', interpolate=TRUE, res='dev', dec=1)
Run the code above in your browser using DataLab