Learn R Programming

tsfgrnn (version 1.0.5)

predict.grnnForecast: Predict method for GRNN models for time series forecasting.

Description

Predicted values based on a GRNN model for time series forecasting.

Usage

# S3 method for grnnForecast
predict(object, h, ...)

Value

a grnnForecast object with the prediction and information about the GRNN model, see the documentation of grnn_forecasting

for the structure of grnnForecast objects.

Arguments

object

a grnnForecast object obtained by a call to the grnn_forecasting function.

h

an integer. The forecasting horizon.

...

further arguments passed to or from other methods.

Details

If the models uses the MIMO strategy for multiple-step ahead prediction, the forecasting horizon is fixed to the model forecasting horizon.

Examples

Run this code
pred <- grnn_forecasting(UKgas, h = 4, msas = "MIMO")
new_pred <- predict(pred, h = 4)
print(new_pred$prediction)
plot(new_pred) # To see a plot with the forecast

Run the code above in your browser using DataLab