1.1 MARSS model form
A full MARSS model, with Gaussian errors, takes the form: \[\begin{equation} \begin{gathered} \mathbf{x}_t = \mathbf{B}_t\mathbf{x}_{t-1} + \mathbf{u}_t + \mathbf{C}_t\mathbf{c}_t + \mathbf{G}_t\mathbf{w}_t, \text{ } \mathbf{w}_t \sim \,\text{MVN}(0,\mathbf{Q}_t) \\ \mathbf{y}_t = \mathbf{Z}_t\mathbf{x}_t + \mathbf{a}_t + \mathbf{D}_t\mathbf{d}_t + \mathbf{H}_t\mathbf{v}_t, \text{ } \mathbf{v}_t \sim \,\text{MVN}(0,\mathbf{R}_t) \\ \mathbf{x}_1 \sim \,\text{MVN}(\boldsymbol{\pi},\boldsymbol{\Lambda}) \text{ or } \mathbf{x}_0 \sim \,\text{MVN}(\boldsymbol{\pi},\boldsymbol{\Lambda}) \end{gathered} \tag{1.1} \end{equation}\] The \(\mathbf{x}\) equation is termed the state process and the \(\mathbf{y}\) equation is termed the observation process. Data enter the model as the \(\mathbf{y}\); that is the \(\mathbf{y}\) is treated as the data although there may be missing data. The \(\mathbf{c}_t\) and \(\mathbf{d}_t\) are inputs (aka, exogenous variables, covariates or indicator variables). The \(\mathbf{G}_t\) and \(\mathbf{H}_t\) are also typically inputs (fixed values with no missing values).
The bolded terms are matrices with the following definitions:
- \(\mathbf{x}\) is a \(m \times T\) matrix of states. Each \(\mathbf{x}_t\) is a realization of the random variable \(\mathbf{X}_t\) at time \(t\).
- \(\mathbf{w}\) is a \(m \times T\) matrix of the process errors. The process errors at time \(t\) are multivariate normal with mean 0 and covariance matrix \(\mathbf{Q}_t\).
- \(\mathbf{y}\) is a \(n \times T\) matrix of the observations. Some observations may be missing.
- \(\mathbf{v}\) is a \(n \times T\) column vector of the non-process errors. The observation erros at time \(t\) are multivariate normal with mean 0 and covariance matrix \(\mathbf{R}_t\).
- \(\mathbf{B}_t\) and \(\mathbf{Z}_t\) are parameters and are \(m \times m\) and \(n \times m\) matrices.
- \(\mathbf{u}_t\) and \(\mathbf{a}_t\) are parameters and are \(m \times 1\) and \(n \times 1\) column vectors.
- \(\mathbf{Q}_t\) and \(\mathbf{R}_t\) are parameters and are \(g \times g\) (typically \(m \times m\)) and \(h \times h\) (typically \(n \times n\)) variance-covariance matrices.
- \(\boldsymbol{\pi}\) is either a parameter or a fixed prior. It is a \(m \times 1\) matrix.
- \(\boldsymbol{\Lambda}\) is either a parameter or a fixed prior. It is a \(m \times m\) variance-covariance matrix.
- \(\mathbf{C}_t\) and \(\mathbf{D}_t\) are parameters and are \(m \times p\) and \(n \times q\) matrices.
- \(\mathbf{c}\) and \(\mathbf{d}\) are inputs (no missing values) and are \(p \times T\) and \(q \times T\) matrices.
- \(\mathbf{G}_t\) and \(\mathbf{H}_t\) are inputs (no missing values) and are \(m \times g\) and \(n \times h\) matrices.
AR(p) models can be written in the above form by properly defining the \(\mathbf{x}\) vector and setting some of the \(\mathbf{R}\) variances to zero. Although the model appears to only include i.i.d. errors (\(\mathbf{v}_t\) and \(\mathbf{w}_t\)), in practice, AR(p) errors can be included by moving the error terms into the state model. Similarly, the model appears to have independent process (\(\mathbf{v}_t\)) and observation (\(\mathbf{w}_t\)) errors, however, in practice, these can be modeled as identical or correlated by using one of the state processes to model the errors with the \(\mathbf{B}\) matrix set appropriately for AR or white noise.