Learn R Programming

ilc (version 1.0)

residual_plots: Miscellaneous plotting functions for lca and lca.rh type regression objects.

Description

A diagnostic plot with three graphical regions showing the residual values by the given ages, calendar years and (cohort) years of birth.

Usage

residual_plots(lca.obj, file = paste("res", deparse(substitute(lca.obj)), "ps", sep = "."), view = T)

Arguments

lca.obj
an object of class lca
file
an optional string value indicating the output postscript file name (i.e. with extension .ps). By default, it concatenates "res." and the model object name (with extension ".ps"). If it is set to NULL, the plot will be sent instead to the active graphical window.
view
logical, if TRUE (and file argument is not NULL) then Ghostview will be launched with the created .ps file

Value

Diagnostic plot of the residual values of a Lee-Carter model object.

See Also

fitted_plots, lca.rh

Examples

Run this code
mod6d <- lca.rh(dd.cmi.pens, mod='lc', restype='dev', interpolate=TRUE)
# send fitted plots with legends to 'res.mod6.ps' file:
residual_plots(mod6d)
# send fitted plots to active graphics window
residual_plots(mod6d, file=NULL)

Run the code above in your browser using DataLab