forecast.SMEDIAN: Forecast a seasonal median model

View source: R/methods-fable.R

forecast.SMEDIANR Documentation

Forecast a seasonal median model

Description

Forecast a fitted SMEDIAN model.

Usage

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

Arguments

object

A fitted SMEDIAN 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 SMEDIAN: SMEDIAN(), fitted.SMEDIAN(), model_sum.SMEDIAN(), residuals.SMEDIAN()

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("SMEDIAN" = SMEDIAN(value ~ lag("week")))

forecast(model_frame, h = 24)

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