View source: R/robust_decompose.R
robust_decompose | R Documentation |
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 )
x |
a time series. |
S |
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. |
wsize |
is filter/rolling med size |
use.trend |
if TRUE, uses standard decomposition. If FALSE, uses no trend component. |
K |
a sigma (standard deviation) bound. The observations that exceed sigma*K become reduced weight in the regression. |
ICpen |
is the information criterion penalty, e.g. string "BIC", "HQC" or "AIC", or a fixed number. |
extreg |
a vector, matrix or data frame of data containing external regressors; each column is a variable. |
use.autoregressive |
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.\insertNoCite*tsrobprep
## Not run: GBload.decomposed <- robust_decompose(GBload[,-1], S = c(48,7*48)) head(GBload.decomposed$components) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.