| ucm | R Documentation |
ucm creates an S3 object representing an UC model:
ucm(
z,
bc = FALSE,
uc = NULL,
xreg = NULL,
cform = TRUE,
fit = TRUE,
s = 12,
...
)
z |
an object of class |
bc |
logical. If TRUE, logs are taken. |
uc |
list of objects of class |
xreg |
optional design matrix of regressors. |
cform |
logical. If TRUE, observation equation is given in contemporaneous form (j = 0); otherwise it is written in lagged form (j = 1). |
fit |
logical. If TRUE, model is fitted. |
s |
integer, seasonal period. Optional argument to create a UC model without providing a time series. |
... |
additional parameters for the |
z(t) = b'*x(t) + T(t - j) + S(t - j) + C(t - j) + AR(t - j) + I(t),
where z(t) is a time series; x(t) is a set of regressors; T(t - j), S(t - j),
C(t - j), AR(t - j) and I(t) are the trend, seasonal, cycle, autoregressive
and irregular unobserved components; and i indicates whether the model is
written in lagged form (j = 1) or contemporaneous form (j = 0).
See uc and ssm for more details.
An object of class ucm and class ssm.
Durbin, J. and Koopman, S.J. (2012) Time Series Analysis by State Space Methods, 2nd ed., Oxford University Press, Oxford.
Harvey, A.C. (1989) Forecasting, Structural Time Series Models and the Kalman Filter. Cambridge University Press, Cambridge.
# Local level model
ucm1 <- ucm(Nile, uc = "llm")
ucm1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.