powered by
stsm creates an S3 object representing a time-invariant structural time series model.
stsm
stsm(y, b, C, fSv, s2v, s2u = 1, xreg = NULL, bc = FALSE, fit = TRUE, ...)
an object of class ts.
ts
vector of constants.
matrix of constants.
function to create the covariance matrix of v_t.
variances of the vector error v_t in the state equation.
variance of the error u_t in the observation equation.
matrix of regressors.
logical. If TRUE logs are taken.
logical. If TRUE, model is fitted.
other arguments.
An object of class stsm.
y_t = b'x_t + u_t (observation equation), x_t = Cx_t-1 + v_t (state equation).
Durbin, J. and Koopman, S.J. (2012) Time Series Analysis
# NOT RUN { # Local level model b <- 1 C <- as.matrix(1) stsm1 <- stsm(Nile, b, C, s2v = c(lvl = 0.5), s2u = c(irr = 1)) stsm1 # }
Run the code above in your browser using DataLab