Learn R Programming

PSF (version 0.5)

predict.psf: Forecasting of univariate time series using a trained PSF model

Description

Takes a trained PSF model and the prediction horizon as inputs.

Usage

# S3 method for psf
predict(object, n.ahead = 1, ...)

Arguments

object

The trained PSF model generated by psf() function.

n.ahead

The number of predicted values to be obtained.

Other parameters will be ignored.

Value

Vector with the resulting predictions

Examples

Run this code
# NOT RUN {
## 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)
# }

Run the code above in your browser using DataLab