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

matfle.plot

Miscellaneous plotting functions for lca and lca.rh type regression objects. Plot of forecasted life expectancy based on a series of fitted Lee-Carter model objects


Description

Compute the historical and forecasted life expectancy of a series of fitted Lee-Carter models and plot them in one comparative figure

Usage

matfle.plot(lca.obj, lca.base, at = 65, label = NULL, ...)

Arguments

lca.obj

a list of fitted model objects of class lca (such as returned by elca.rh function)

lca.base

base fitted model object of class lca to be used in comparison

at

target age at which to calculate life expectancy

label

a data label

...

additional arguments to forecast function

Details

It makes use of the life.expectancy and forecast functions from the demography and forecast packages, respectively, in order to compute life expectancy at the specified target age for each of the model objects in lca.obj.

Value

Plot

Author(s)

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

See Also

Examples

rfp.cmi <- dd.rfp(dd.cmi.pens, c(0.5, 1.2, -0.7, 2.5))
mod6e <- elca.rh(rfp.cmi, age=50:100, interpolate=TRUE, dec=3)
# plot with original (fitted) base values
matfle.plot(mod6e$lca, label='RFP CMI')
# use a standard LC model fitting as base values
mod6 <- lca.rh(dd.cmi.pens, mod='lc', error='gauss', interpolate=TRUE)
matfle.plot(mod6e$lca, mod6, label='RFP CMI')

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.