plot.psf: Plot actual and forecasted values of an univariate time...

Description Usage Arguments Examples

Description

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

Usage

1
2
## 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

1
2
3
4
5
6
7
8
## 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)

Example output



PSF documentation built on May 2, 2019, 2:10 a.m.