Learn R Programming

bssm (version 0.1.8)

mv_gssm: General multivariate linear-Gaussian state space models

Description

Construct an object of class gssm by defining the corresponding terms of the observation and state equation:

Usage

mv_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)

Arguments

y

Observations as multivariate time series (or matrix) of length \(n\).

Z

System matrix Z of the observation equation. Either a p x m matrix or a p x m x n array, or an object which can be coerced to such.

H

Covarianc matrix for observational level noise.

T

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.

R

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.

a1

Prior mean for the initial state as a vector of length m.

P1

Prior covariance matrix for the initial state as m x m matrix.

xreg

An array containing p covariate matrices with dimensions n x h.

beta

matrix of regression coefficients with n columns. Used as an initial value in MCMC. Defaults to matrix of zeros.

state_names

Names for the states.

H_prior, Z_prior, T_prior, R_prior

Priors for the NA values in system matrices.

obs_intercept, state_intercept

Intercept terms for observation and state equations, given as a p times n and m times n matrices.

Value

Object of class mv_gssm.

Details

$$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, I_p)\), \(\eta_t \sim N(0, I_k)\) and \(\alpha_1 \sim N(a_1, P_1)\) independently of each other.