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

plot.fmforecast

Plot forecasts from a functional demographic modell


Description

Type of plot depends on value of plot.type:

plot.type="function"

produces a plot of the forecast functions;

plot.type="components"

produces a plot of the basis functions and coefficients with forecasts and prediction intervals for each coefficient;

plot.type="variance"

produces a plot of the variance components.

Usage

## S3 method for class 'fmforecast'
plot(x, plot.type = c("function", "component",
  "variance"), vcol = 1:4, mean.lab = "Mean", xlab2 = "Year",
  h = 1, ...)

## S3 method for class 'lca'
plot(x, ...)

Arguments

x

Output from forecast.ftsm, forecast.fdm or lca.

plot.type

Type of plot. See details.

vcol

Colors to use if plot.type="variance".

mean.lab

Label for mean component.

xlab2

x-axis label for coefficient time series.

h

If plot.type="variance", h gives the forecast horizon for which the variance is plotted.

...

Other arguments are passed to plot.demogdata (if plot.type=="function"), plot (if plot.type=="variance") or plot.ftsf (if plot.type=="component").

Value

None. Function produces a plot

Author(s)

Rob J Hyndman

See Also

Examples

france.fcast <- forecast(fdm(fr.mort))
plot(france.fcast)
plot(france.fcast,"c")
plot(france.fcast,"v")

demography

Forecasting Mortality, Fertility, Migration and Population Data

v1.22
GPL (>= 2)
Authors
Rob J Hyndman with contributions from Heather Booth, Leonie Tickle and John Maindonald.
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.