forecast.SNAIVE2: Forecast a SNAIVE2 model

View source: R/methods-fable.R

forecast.SNAIVE2R Documentation

Forecast a SNAIVE2 model

Description

Forecast a fitted SNAIVE2 model.

Usage

## S3 method for class 'SNAIVE2'
forecast(object, new_data, specials = NULL, ...)

Arguments

object

A fitted SNAIVE2 model object.

new_data

A tsibble containing future time points.

specials

Parsed specials. Currently not used.

...

Additional arguments. Currently not used.

Value

A vector of forecast distributions.

See Also

Other SNAIVE2: SNAIVE2(), fitted.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))

forecast(model_frame, h = 24)

tscv documentation built on May 13, 2026, 9:07 a.m.