Produces forecasts from a trained model.

# S3 method for ARIMA
forecast(object, new_data = NULL, specials = NULL,
  bootstrap = FALSE, times = 5000, ...)

Arguments

object

The time series model used to produce the forecasts

new_data

A tsibble containing future information used to forecast.

specials

(passed by fabletools::forecast.mdl_df()).

bootstrap

If TRUE, then forecast distributions are computed using simulation with resampled errors.

times

The number of sample paths to use in estimating the forecast distribution when boostrap = TRUE.

...

Additional arguments for forecast model methods.

Value

A list of forecasts.

Examples

USAccDeaths %>% as_tsibble %>% model(arima = ARIMA(log(value) ~ pdq(0,1,1) + PDQ(0,1,1))) %>% forecast()
#> # A fable: 24 x 4 [1M] #> # Key: .model [1] #> .model index value .distribution #> <chr> <mth> <dbl> <dist> #> 1 arima 1979 Jan 8290. t(N(9.0, 0.0014)) #> 2 arima 1979 Feb 7453. t(N(8.9, 0.0018)) #> 3 arima 1979 Mar 8276. t(N(9.0, 0.0022)) #> 4 arima 1979 Apr 8584. t(N(9.1, 0.0025)) #> 5 arima 1979 May 9499. t(N(9.2, 0.0029)) #> 6 arima 1979 Jun 9900. t(N(9.2, 0.0033)) #> 7 arima 1979 Jul 10988. t(N(9.3, 0.0037)) #> 8 arima 1979 Aug 10132. t(N(9.2, 0.0041)) #> 9 arima 1979 Sep 9138. t(N(9.1, 0.0045)) #> 10 arima 1979 Oct 9391. t(N(9.1, 0.0049)) #> # … with 14 more rows