Decomposes the estimated model or prediction into its component parts (states).
# S3 method for tsissm.estimate
tsdecompose(object, simplify = FALSE, start = 1, ...)# S3 method for tsissm.predict
tsdecompose(object, simplify = FALSE, start = 1, ...)
# S3 method for tsissm.simulate
tsdecompose(object, simplify = FALSE, start = 1, ...)
For the estimated object, returns an xts matrix of the state components (including Irregular term). For the predicted object, a list with the simulated state components of class “tsmodel.predict” which includes the predictive distribution and original (estimated) series components.
an object of class “tsissm.estimate” or “tsissm.predict”
simplification of the returned states aggregates the level and slope (if present) into a Trend component, all Seasonal components, all ARMA components and the error terms into an Irregular component. This may be useful when bagging is carried out (assuming equal lambda in the box-cox transform). This also simplifies the ability to created custom overrides of the Trend and rebuilt the predictive distribution.
whether to return the predicted states from t=1 to h or the states from t=0 to (h-1). The latter is sometimes useful as the sum of the states equals the predicted value (since the predictions are based on the lagged state).
not currently used.
The 1-step ahead prediction is given by the following equation: $$y_{t} = x_{t-1} w + \varepsilon_{t}$$ Because the decomposition pre lags the states so that the seed state is aligned with the error term, then summing the state distribution of each component with the returned error distribution will ensure that the exact same predicted value matched to the correct date is returned.