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

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.

Author(s)

Z. Butt and S. Haberman and H. L. Shang

See Also

Examples

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)

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.