View source: R/methods-fable.R
| forecast.SNAIVE2 | R Documentation |
Forecast a fitted SNAIVE2 model.
## S3 method for class 'SNAIVE2'
forecast(object, new_data, specials = NULL, ...)
object |
A fitted |
new_data |
A |
specials |
Parsed specials. Currently not used. |
... |
Additional arguments. Currently not used. |
A vector of forecast distributions.
Other SNAIVE2:
SNAIVE2(),
fitted.SNAIVE2(),
model_sum.SNAIVE2(),
residuals.SNAIVE2()
library(dplyr)
library(tsibble)
library(fabletools)
train_frame <- elec_price |>
filter(bidding_zone == "DE") |>
slice_head(n = 24 * 21) |>
as_tsibble(index = time)
model_frame <- train_frame |>
model("SNAIVE2" = SNAIVE2(value))
forecast(model_frame, h = 24)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.