Creates a Seasonal-Trend decomposition using Loess model.

STLModel(s)

Arguments

s

Seasonal period. Fitting needs more than 13 cycles of data, i.e. more than `13 * s` observations, because the loess smoothing span that ForecastBaselines.jl fixes at 13 cannot be reached with fewer. Reported upstream at <https://github.com/ManuelStapper/ForecastBaselines.jl/issues/5>.

Value

A spec for a Julia `STLModel`, built when it is fitted (see [juliabridge::julia_spec()])

Details

The decomposition always includes a trend component, and the loess smoothing settings, robust iterations among them, belong to the estimation settings in ForecastBaselines.jl, which `fit_baseline()` does not expose. The seasonal period is therefore the only argument.

Examples

if (FALSE) { # \dontrun{
# Monthly seasonality
model <- STLModel(s = 12)
} # }