residuals.SNAIVE2: Extract residuals from a SNAIVE2 model

View source: R/methods-fable.R

residuals.SNAIVE2R Documentation

Extract residuals from a SNAIVE2 model

Description

Extract residuals from a fitted SNAIVE2 model.

Usage

## S3 method for class 'SNAIVE2'
residuals(object, ...)

Arguments

object

A fitted SNAIVE2 model object.

...

Additional arguments. Currently not used.

Value

Residuals.

See Also

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

residuals(model_frame)

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