| decomp.ssm | R Documentation |
Estimates the unobserved components of a time series (trend, seasonal, cycle, stationary, and irregular) based on the structure of an underlying model. The estimation can be carried out through the UCARIMA representation, the state-space model (SSM) form, or via forward/backward forecasts.
## S3 method for class 'ssm'
decomp(mdl, tol = 1e-05, ...)
## S3 method for class 'tfm'
decomp(
mdl,
y = NULL,
method = c("mixed", "forecast", "backcast"),
envir = NULL,
...
)
## S3 method for class 'ucarima'
decomp(mdl, ...)
decomp(mdl, ...)
## S3 method for class 'um'
decomp(
mdl,
z = NULL,
method = c("ucarima", "ucarima0", "ssm", "ssm0", "mixed", "forecast", "backcast"),
envir = parent.frame(),
...
)
## S3 method for class 'um'
decomp(
mdl,
z = NULL,
method = c("ucarima", "ucarima0", "ssm", "ssm0", "mixed", "forecast", "backcast"),
envir = parent.frame(),
...
)
mdl |
An object of class |
tol |
numeric tolerance for classifying eigenvalues. |
... |
Additional arguments passed to internal methods. |
y |
an object of class |
method |
Character string specifying the decomposition method. Options are:
|
envir |
environment in which the function arguments are evaluated. If NULL the calling environment of this function will be used. |
z |
an object of class |
The function applies the corresponding internal routines to estimate
the components depending on the chosen method. For UCARIMA-based
methods, the Wiener–Kolmogorov filter is used. For state-space approaches,
a Kalman smoother is applied.
A data.frame with the estimated unobserved components.
Z <- AirPassengers
um1 <- um(Z, i = list(1, c(1, 12)), ma = list(1, c(1, 12)), bc = TRUE)
uc1 <- decomp(um1, method = "ucarima")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.