Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

lca.dev.res

Miscellaneous utility functions for lca and lca.rh type regression objects. Deviance residuals of the Lee-Carter model


Description

A simple utility function to replace the original residuals (e.g. logrates, rates, deaths) of a LC fit with deviance residuals without the need to re-estimate the regression parameters. We note that the estimation of the parameters can be particularly slow in the case of the APC model.

Usage

lca.dev.res(lca.obj, pop, clip = 0)

Arguments

lca.obj

an object of class lca

pop

matrix of population data corresponding to the fitted mortality rates

clip

number of years to clip from start and end of cohort years

Details

The Lee-Carter regression object contains the type of residuals specified in the original function call, which might need to be changed for further analysis, but without actually re-running the entire iterative estimation process.

Value

An identical regression object as lca.obj containing the corresponding deviance residuals

Author(s)

Zoltan Butt, Steven Haberman and Han Lin Shang

See Also

Examples

# original model object with 'logrates' residuals
mod6 <- lca.rh(dd.cmi.pens, mod="lc", error="gauss", max=110, interpolate=TRUE)
# adjusted model object with 'deviance' residuals: 
dev6 <- lca.dev.res(mod6, insp.dd(dd.cmi.pens, "pop"))

ilc

Lee-Carter Mortality Models using Iterative Fitting Algorithms

v1.0
GPL (>= 2)
Authors
Zoltan Butt, Steven Haberman and Han Lin Shang
Initial release
2014-11-19

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.