Similar to other predict methods, this function predicts fitted values from a fitted "AutoARIMA" object.

# S3 method for AutoARIMA
predict(
  model,
  data = NULL,
  key = NULL,
  forecast.method = NULL,
  forecast.length = NULL,
  ...
)

Arguments

model

R6Class object
An "AutoARIMA" object for prediction.

data

DataFrame, optional
Includes the ID column and external Data (exogeneous variables) for prediction.
Defaults to NULL.

key

character, optional
Name of the key in the data.
Defaults to NULL and if data is not NULL and key is not provided, defaults to the first column.

forecast.method

c("formula.forecast", "innovations.algorithm"), optional
Store information for the subsequent forecast method.

  • "formula.forecast": compute future series via formula.

  • "innovations.algorithm": apply innovations algorithm to compute future series, which requires more original information to be stored

Defaults to "innovations.algorithm".

forecast.length

integer, optional
Number of points to forecast.
Defaults to 1.

...

Reserved parameter.

Format

S3 methods

Value

Predicted values are returned as a DataFrame, structured as follows:

  • ID: with same name and type the ID column of data.

  • FORECAST: type DOUBLE, representing predicted values.

  • SE: type DOUBLE, standard error.

  • LO80: type DOUBLE, low 80% values.

  • HI80: type DOUBLE, high 80% values.

  • LO95: type DOUBLE, low 95% values.

  • HI95: type DOUBLE, high 95% values.

Examples

Call the function and obtain the result:

> predict(model = autoarima, forecast.length = 5)
  TIMESTAMP   FORECAST       SE       LO80      HI80        LO95      HI95
1         0 -15.544832 3.298697 -19.772283 -11.31738 -22.0101587 -9.079505
2         1  35.587390 3.404891  31.223846  39.95094  28.9139269 42.260854
3         2  56.498532 3.411723  52.126231  60.87083  49.8116773 63.185386
4         3   7.086176 3.412170   2.713303  11.45905   0.3984467 13.773906
5         4 -16.266996 3.412250 -20.639972 -11.89402 -22.9548838 -9.579108

See also