stsm_prior {autostsm} | R Documentation |
Return a naive model prior decomposition
Description
Return a naive model prior decomposition
Usage
stsm_prior(y, freq, decomp = "", seasons = NULL, cycle = NULL)
Arguments
y |
an object created from stsm_detect_frequency |
freq |
Frequency of the data |
decomp |
decomposition string |
seasons |
The seasonal periods to split the seasonality into |
cycle |
The cycle periods |
Value
data table containing a naive decomposition using STL
Examples
## 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)
## End(Not run)
[Package autostsm version 3.1.5 Index]