Description Usage Arguments Details Value Author(s) See Also Examples
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.
1 | 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
1 2 3 4 | # 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"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.