
Decompose a time series into trend, level and potentially multiple seasonal components including all interactions. The function allows for missings.
robust_decompose(
x,
S,
wsize = max(2 * max(S), 25),
use.trend = TRUE,
K = 4,
ICpen = "BIC",
extreg = NULL,
use.autoregressive = NULL
)
a time series.
a number or vector describing the seasonalities (S_1, ..., S_K) in the data, e.g. c(24, 168) if the data consists of 24 observations per day and there is a weekly seasonality in the data.
is filter/rolling med size
if TRUE, uses standard decomposition. If FALSE, uses no trend component.
a sigma (standard deviation) bound. The observations that exceed sigma*K become reduced weight in the regression.
is the information criterion penalty, e.g. string "BIC", "HQC" or "AIC", or a fixed number.
a vector, matrix or data frame of data containing external regressors; each column is a variable.
if TRUE, removes the autoregression from the series. If NULL, it is derived data based.
A list which contains a vector of fitted values, a vector of weights given to the original time series, and a matrix of components of the decomposition.*tsrobprep
# NOT RUN {
GBload.decomposed <- robust_decompose(GBload[,-1], S = c(48,7*48))
head(GBload.decomposed$components)
# }
Run the code above in your browser using DataLab