8.1 Overview
A multivariate autoregressive state-space (MARSS) model with covariate effects in both the process and observation components is written as: xt=Btxt−1+ut+Ctct+wt, where wt∼MVN(0,Qt)yt=Ztxt+at+Dtdt+vt, where vt∼MVN(0,Rt) where ct is the p×1 vector of covariates (e.g., temperature, rainfall) which affect the states and dt is a q×1 vector of covariates (potentially the same as ct), which affect the observations. Ct is an m×p matrix of coefficients relating the effects of ct to the m×1 state vector xt, and Dt is an n×q matrix of coefficients relating the effects of dt to the n×1 observation vector yt.
With the MARSS()
function, one can fit this model by passing in model$c
and/or model$d
in the model
argument as a p×T or q×T matrix, respectively. The form for Ct and Dt is similarly specified by passing in model$C
and/or model$D
. C and D are matrices and are specified as 2-dimensional matrices as you would other parameter matrices.