Produces forecasts from a trained model.
# S3 method for class 'ETS'
forecast(
object,
new_data,
specials = NULL,
simulate = FALSE,
bootstrap = FALSE,
times = 5000,
...
)
A model for which forecasts are required.
A tsibble containing the time points and exogenous regressors to produce forecasts for.
(passed by fabletools::forecast.mdl_df()
).
If TRUE
, prediction intervals are produced by simulation rather than using analytic formulae.
If TRUE
, then forecast distributions are computed using simulation with resampled errors.
The number of sample paths to use in estimating the forecast distribution if simulated intervals are used.
Other arguments passed to methods
A list of forecasts.
as_tsibble(USAccDeaths) %>%
model(ets = ETS(log(value) ~ season("A"))) %>%
forecast()
#> # A fable: 24 x 4 [1M]
#> # Key: .model [1]
#> .model index value .mean
#> <chr> <mth> <dist> <dbl>
#> 1 ets 1979 Jan t(N(9, 0.0011)) 8296.
#> 2 ets 1979 Feb t(N(8.9, 0.0014)) 7524.
#> 3 ets 1979 Mar t(N(9, 0.0018)) 8366.
#> 4 ets 1979 Apr t(N(9.1, 0.0022)) 8622.
#> 5 ets 1979 May t(N(9.2, 0.0026)) 9532.
#> 6 ets 1979 Jun t(N(9.2, 0.003)) 10049.
#> 7 ets 1979 Jul t(N(9.3, 0.0035)) 10976.
#> 8 ets 1979 Aug t(N(9.2, 0.004)) 10252.
#> 9 ets 1979 Sep t(N(9.1, 0.0045)) 9169.
#> 10 ets 1979 Oct t(N(9.2, 0.005)) 9499.
#> # ℹ 14 more rows