plot.fitStMoMo: Plot fitted parameters from a stochastic mortality model

Description Usage Arguments Examples

View source: R/plotfitStMoMo.R

Description

Plot fitted parameters of a stochastic mortality model of class "fitStMoMo".

Usage

1
2
## S3 method for class 'fitStMoMo'
plot(x, nCol = 2, parametricbx = TRUE, type = "l", ...)

Arguments

x

an object of class "fitStMoMo" with the fitted parameters of a stochastic mortality model.

nCol

number of columns to use in the plot.

parametricbx

if FALSE parametric age-modulating terms, which don't need to be estimated, are not plotted.

type

what type of plot should be drawn. See plot.

...

additional arguments to control graphical appearance. See plot.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#Fit and plot a Lee-Carter model
LCfit <- fit(lc(), data = EWMaleData, ages.fit = 55:89)
plot(LCfit)
plot(LCfit, type = "p", pch = 19)

#Fit and plot a CBD model
CBDfit <- fit(cbd(), data = central2initial(EWMaleData), ages.fit = 55:89)
plot(CBDfit)
plot(CBDfit, parametricbx = FALSE)
plot(CBDfit, nCol = 1, parametricbx = FALSE, lwd = 2)

amvillegas/StMoMo documentation built on Nov. 7, 2019, 5:39 a.m.