Learn R Programming

ilc (version 1.0)

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

Description

A diagnostic plot with two graphical regions showing the fitted log rates by the given ages and calendar years.

Usage

fitted_plots(lca.obj, file = paste("fit", deparse(substitute(lca.obj)), "ps", sep = "."), view = T, labs = T, col)

Arguments

lca.obj
an object of class lca.rh
file
an optional string value indicating the output postscript file name (i.e. with extension .ps). By default, it concatenates "fit." 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
labs
logical, if TRUE, it adds age/years text labels to fitted curves
col
color palette to be used in the plot

Value

Diagnostic plots of fitted curves by age and by calendar year of a Lee-Carter model object.

See Also

residual_plots, lca.rh

Examples

Run this code
mod6 <- lca.rh(dd.cmi.pens, mod='lc', max=110)
# send fitted plots with legends to 'fit.mod6.ps' file:
fitted_plots(mod6)
# send fitted plots without legends to active graphics window
fitted_plots(mod6, file=NULL, labs=FALSE)

Run the code above in your browser using DataLab