| ssm | R Documentation |
ssm creates an S3 object representing a time-invariant state space
model:
ssm(z, b, C, S, xreg = NULL, bc = FALSE, cform = TRUE, tol = 1e-05)
z |
an object of class |
b |
vector of coefficients (m-dimensional). |
C |
matrix of coefficients (m x m). |
S |
covariance matrix of the error vector [u(t), v(t)], (m+1 x m+1). |
xreg |
design matrix of regressors. |
bc |
logical. If TRUE logs are taken. |
cform |
logical. If TRUE state equation is given in contemporaneous form, otherwise it is written in lagged form. |
tol |
tolerance to check if a value is zero or one. |
z(t) = b'x(t-j) + u(t) (observation equation), x(t) = Cx(t-1) + v(t) (state equation), j = 0 for contemporaneous form or j = 1 for lagged form. Note: the lagged form (j=1) is equivalent to the future form x(t+1) = Cx(t) + v(t+1).
An object of class ssm containing:
z |
the input time series |
b |
observation coefficients |
C |
state transition matrix |
S |
error covariance matrix |
xreg |
regressor matrix (if provided) |
a |
regression coefficients for xreg (if computed) |
z.name |
name of the input series |
bc |
Box-Cox transformation indicator |
m |
number of state variables |
cform |
form indicator (contemporaneous vs lagged) |
is.adm |
admissibility flag |
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
b <- 1
C <- as.matrix(1)
ssm1 <- ssm(Nile, b, C, S = diag(c(irr = 1, lvl = 0.5)) )
ssm1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.