TBATS: TBATS model

View source: R/methods-fable.R

TBATSR Documentation

TBATS model

Description

Specify a TBATS model for use with fabletools::model().

Usage

TBATS(formula, ...)

Arguments

formula

A model formula specifying the response variable, for example value.

...

Further arguments passed to forecast::tbats(), including periods.

Details

TBATS() is a model specification wrapper around forecast::tbats() for the fable, tsibble, and fabletools ecosystem.

TBATS stands for trigonometric seasonality, Box-Cox transformation, ARMA errors, trend, and seasonal components. It can be useful for time series with multiple or complex seasonal patterns.

The seasonal periods must be supplied through the periods argument.

Value

A model definition that can be used inside fabletools::model().

See Also

Other TBATS: fitted.TBATS(), forecast.TBATS(), model_sum.TBATS(), residuals.TBATS()

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("TBATS" = TBATS(value, periods = c(24, 168)))

model_frame


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