Trigonometric seasonality, Box-Cox transformation, ARMA errors, trend and
seasonal components (De Livera, Hyndman & Snyder, 2011). The seasonal
periods need not be whole numbers and there may be several. Whatever is
left as NULL is chosen by AIC. It is the slowest model of the package:
seconds for ten years of monthly data.
Usage
model_tbats(
periods = NULL,
harmonics = NULL,
box_cox = NULL,
trend = NULL,
damped = NULL,
arma_errors = NULL,
arma_orders = NULL
)
Arguments
- periods
Seasonal periods; by default the period of the series.
- harmonics
Harmonics of each period, in increasing order of period.
- box_cox, trend, damped, arma_errors
TRUE, FALSE, or NULL to
choose.
- arma_orders
(p, q) of the ARMA errors, instead of choosing.
See also
Other models:
model_arima(),
model_auto_arima(),
model_box_cox(),
model_croston(),
model_decomposed(),
model_ensemble(),
model_ets(),
model_holt_winters(),
model_log_linear(),
model_mean(),
model_prophet(),
model_theta()
Examples
# a structure given in full fits at once; whatever is left out is chosen
model <- model_tbats(harmonics = 3, box_cox = FALSE, trend = TRUE, damped = FALSE,
arma_errors = FALSE)
fit <- fit_model(model, log(AirPassengers))
exp(predict(fit, 3))
#> Jan Feb Mar
#> 1961 451.6791 469.9160 494.5989