Construct an object of class gssm
by defining the corresponding terms
of the observation and state equation:
gssm(y, Z, H, T, R, a1, P1, xreg = NULL, beta, state_names, H_prior,
Z_prior, T_prior, R_prior, obs_intercept, state_intercept)
Observations as time series (or vector) of length \(n\).
System matrix Z of the observation equation. Either a vector of length m or a m x n array, or an object which can be coerced to such.
Vector of standard deviations. Either a scalar or a vector of length n, or an object which can be coerced to such.
System matrix T of the state equation. Either a m x m matrix or a m x m x n array, or object which can be coerced to such.
Lower triangular matrix R the state equation. Either a m x k matrix or a m x k x n array, or object which can be coerced to such.
Prior mean for the initial state as a vector of length m.
Prior covariance matrix for the initial state as m x m matrix.
Matrix containing covariates.
Regression coefficients. Used as an initial value in MCMC. Defaults to vector of zeros.
Names for the states.
Priors for the NA values in system matrices.
Intercept terms for observation and state equations, given as a length n vector and m times n matrix respectively.
Object of class gssm
.
$$y_t = D_t + Z_t \alpha_t + H_t \epsilon_t, (\textrm{observation equation})$$ $$\alpha_{t+1} = C_t + T_t \alpha_t + R_t \eta_t, (\textrm{transition equation})$$
where \(\epsilon_t \sim N(0, 1)\), \(\eta_t \sim N(0, I_k)\) and \(\alpha_1 \sim N(a_1, P_1)\) independently of each other.
The priors are defined for each NA value of the system matrices, in the same order as
these values are naturally read in R. For more flexibility, see lgg_ssm
.