4.1 General matrix specification

MARSS() will fit a general class of constrained MARSS models with linear constraints.

The most general way to specify model structure is to use a list matrix. The list matrix allows one to combine fixed and estimated elements in the parameter specification. It allows a one-to-one correspondence between how you write the parameter matrix on paper and how you specify it in R. For example, let’s say \(\mathbf{Q}\) and \(\mathbf{u}\) have the following forms in your model: \[\begin{equation*} \mathbf{Q}= \begin{bmatrix} q&0&0\\ 0&q&0\\ 0&0&1 \end{bmatrix} \text{ and } \mathbf{u}= \begin{bmatrix} 0.05\\ u_1\\ u_2 \end{bmatrix} \end{equation*}\] So \(\mathbf{Q}\) is a diagonal matrix with the 3rd variance fixed at 1 and the 1st and 2nd estimated and equal. The 1st element of \(\mathbf{u}\) is fixed, and the 2nd and 3rd are estimated and different. You can specify this using a list matrix:

Q <- matrix(list("q",0,0,0,"q",0,0,0,1),3,3)
U <- matrix(list(0.05,"u1","u2"),3,1)

If you print out Q and U, you will see they look exactly like \(\mathbf{Q}\) and \(\mathbf{u}\) written above. MARSS() will keep the fixed values fixed and estimate q, u1, and u2.

Note, shared values are not allowed across parameter matrices. If you have "a" in your \(\mathbf{Q}\) matrix and "a" in your \(\mathbf{R}\) matrix they will be estimated as different values: Q.a and R.a. Sometimes you can get around this by rewriting your model. For example, incorporating \(\mathbf{u}\) in \(\mathbf{C}\) or \(\mathbf{u}\) into \(\mathbf{B}\).