Miscellaneous utility functions for lca and lca.rh type regression objects. Deviance residuals of the Lee-Carter model
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.
lca.dev.res(lca.obj, pop, clip = 0)
lca.obj |
an object of class |
pop |
matrix of population data corresponding to the fitted mortality rates |
clip |
number of years to clip from start and end of cohort years |
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.
An identical regression object as lca.obj
containing the corresponding deviance residuals
Zoltan Butt, Steven Haberman and Han Lin Shang
# 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"))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.