Specify a seasonal naive benchmark model for use with
fabletools::model().
Value
A model definition that can be used inside fabletools::model().
Details
SNAIVE2() is intended for hourly time series. It uses a daily lag for
Tuesday to Friday observations and a weekly lag otherwise. This can be useful
for electricity price or load data where weekdays have similar intraday
structure and weekends require a weekly comparison.
See also
Other SNAIVE2:
fitted.SNAIVE2(),
forecast.SNAIVE2(),
model_sum.SNAIVE2(),
residuals.SNAIVE2()
Examples
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))
model_frame
#> # A mable: 1 x 1
#> SNAIVE2
#> <model>
#> 1 <SNAIVE2>
