demography (version 1.22)

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 fmforecast
plot(x, plot.type = c("function", "component",
  "variance"), vcol = 1:4, mean.lab = "Mean", xlab2 = "Year",
  h = 1, ...)

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

Value

None. Function produces a plot

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").

Author

Rob J Hyndman

See Also

fdm, lca, forecast.fdm

Examples

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

Run the code above in your browser using DataLab