if (requireNamespace("tsibbledata", quietly = TRUE)) {
# Fit a FASSTER model and extract components
library(tsibble)
library(dplyr)
fit <- tsibbledata::aus_retail |>
filter(
State == "Victoria",
Industry == "Cafes, restaurants and catering services"
) |>
model(fasster = FASSTER(Turnover ~ trend(1) + season("year")))
# Extract and view components
components(fit)
}
Run the code above in your browser using DataLab