plot.psf {PSF}R Documentation

Plot actual and forecasted values of an univariate time series

Description

Takes an univariate time series and a vector with forecasted values.

Usage

## S3 method for class 'psf'
plot(x, predictions = c(), cycle = 24, ...)

Arguments

x

The trained PSF model generated by psf() function.

predictions

A vector with previously computed forecasted values.

cycle

The number of values that conform a cycle in the time series (e.g. 24 hours per day, 12 month per year, and so on). Only used when input data is not in time series (ts) format.

...

Additional graphical parameters given to plot function.

Examples

## Train a PSF model from the univariate time series 'nottem' (package:datasets).
p <- psf(nottem)

## Forecast the next 12 values of such time series.
pred <- predict(p, n.ahead = 12)

## Plot forecasted values.
plot(p, pred)

[Package PSF version 0.5 Index]