2.4 Inputs c
and d
In the MARSS model, \(\mathbf{C}\) and \(\mathbf{D}\) are the estimated parameters and \(\mathbf{c}\) and \(\mathbf{d}\) are the inputs. In the model list, c
and d
are entered as a matrix with \(T\) columns. The number of rows depends on the number of inputs.
Let’s say you have temperature data and you want to include a linear effect of temperature that is different for each \(\mathbf{x}\) time series:
C1 <- matrix(c("temp1","temp2"),2,1)
model.list <- list(B=B1, U=U1, C=C1, c=temp, Q=Q1,
Z=Z1, A=A1, R=R1, x0=pi1,V 0=V1, tinitx=0)
If you want a factor effect, then you will need to recode your factor as a matrix with \(T\) columns and a row for each factor. See Chapter 5 for an example.