
Return a naive model prior decomposition
stsm_prior(y, freq, decomp = "", harmonics = NULL)
an object created from stsm_detect_frequency
Frequency of the data
decomposition string
The harmonics to split the seasonality into
data table containing a naive decomposition using STL
# NOT RUN {
#GDP Not seasonally adjusted
library(autostsm)
data("NA000334Q", package = "autostsm") #From FRED
NA000334Q = data.table(NA000334Q, keep.rownames = TRUE)
colnames(NA000334Q) = c("date", "y")
NA000334Q[, "date" := as.Date(date)]
NA000334Q[, "y" := as.numeric(y)]
NA000334Q = NA000334Q[date >= "1990-01-01", ]
prior = stsm_prior(y = NA000334Q$y, freq = 4)
# }
Run the code above in your browser using DataLab