plot.forStMoMo: Plot a forecast from a Stochastic Mortality Model

Description Usage Arguments See Also Examples

View source: R/plotforStMoMo.R

Description

Plot a forecasted Stochastic Mortality Model of class "forStMoMo".

Usage

1
2
3
## S3 method for class 'forStMoMo'
plot(x, nCol = 2, parametricbx = TRUE, only.kt = FALSE,
 only.gc = FALSE,  colour = "grey60", ...)

Arguments

x

an object of class "forStMoMo" with the forecast 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.

only.kt

If TRUE only the period indexes of the model are plotted.

only.gc

If TRUE only the cohort index of the model is plotted. This argument is ignored if only.kt is TRUE.

colour

colour to use in the prediction intervals.

...

additional arguments to control graphical appearance. See plot.

See Also

plot.fitStMoMo

Examples

1
2
3
4
5
6
7
wxt <- genWeightMat(55:89,  EWMaleData$years, clip = 3)
APCfit <- fit(apc(), data = EWMaleData, ages.fit = 55:89, wxt = wxt)
APCfor <- forecast(APCfit)
plot(APCfor)
plot(APCfor, parametricbx = FALSE, nCol = 3)
plot(APCfor, only.kt = TRUE)
plot(APCfor, only.gc = TRUE, lwd = 2)

Example output

Loading required package: gnm
Loading required package: forecast
StMoMo: The following cohorts have been zero weigthed: 1872 1873 1874 1954 1955 1956 
StMoMo: Start fitting with gnm
StMoMo: Finish fitting with gnm

StMoMo documentation built on May 2, 2019, 11:42 a.m.