plot.fmforecast {demography}R Documentation

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

fdm, lca, forecast.fdm

Examples

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

[Package demography version 2.0 Index]