MARSS.dfa {MARSS}R Documentation

Multivariate Dynamic Factor Analysis

Description

The Dynamic Factor Analysis model in MARSS is The argument form="marxss" in a MARSS() function call specifies a MAR-1 model with eXogenous variables model. This is a MARSS(1) model of the form:

\mathbf{x}_{t} = \mathbf{x}_{t-1} + \mathbf{w}_t, \textrm{ where } \mathbf{W}_t \sim \textrm{MVN}(0,\mathbf{I})

\mathbf{y}_t = \mathbf{Z}_t \mathbf{x}_t + \mathbf{D}_t \mathbf{d}_t + \mathbf{v}_t, \textrm{ where } \mathbf{V}_t \sim \textrm{MVN}(0,\mathbf{R}_t)

\mathbf{X}_1 \sim \textrm{MVN}(\mathbf{x0}, 5\mathbf{I})

Note, by default \mathbf{x}_1 is treated as a diffuse prior.

Passing in form="dfa" to MARSS() invokes a helper function to create that model and creates the \mathbf{Z} matrix for the user. \mathbf{Q} is by definition identity, \mathbf{x}_0 is zero and \mathbf{V_0} is diagonal with large variance (5). \mathbf{u} is zero, \mathbf{a} is zero, and covariates only enter the \mathbf{y} equation. Because \mathbf{u} and \mathbf{a} are 0, the data should have mean 0 (demeaned) otherwise one is likely to be creating a structurally inadequate model (i.e. the model implies that the data have mean = 0, yet data do not have mean = 0 ).

Arguments

Some arguments are common to all forms: "y" (data), "inits", "control", "method", "form", "fit", "silent", "fun.kf". See MARSS for information on these arguments.

In addition to these, form="dfa" has some special arguments that can be passed in:

The model argument of the MARSS() call is constrained in terms of what parameters can be changed and how they can be changed. See details below. An additional element, m, can be passed into the model argument that specifies the number of hidden state variables. It is not necessarily for the user to specify Z as the helper function will create a Z appropriate for a DFA model.

Details

The model argument is a list. The following details what list elements can be passed in:

See the User Guide chapter on Dynamic Factor Analysis for examples of of using form="dfa".

Value

A object of class marssMLE. See print() for a discussion of the various output available for marssMLE objects (coefficients, residuals, Kalman filter and smoother output, imputed values for missing data, etc.). See MARSSsimulate() for simulating from marssMLE objects. MARSSboot() for bootstrapping, MARSSaic() for calculation of various AIC related model selection metrics, and MARSSparamCIs() for calculation of confidence intervals and bias.

Usage

MARSS(y, inits = NULL, model = NULL, miss.value = as.numeric(NA), method = "kem", form = "dfa", fit = TRUE, silent = FALSE, control = NULL, fun.kf = "MARSSkfas", demean = TRUE, z.score = TRUE)

Author(s)

Eli Holmes, NOAA, Seattle, USA.

References

The MARSS User Guide: Holmes, E. E., E. J. Ward, and M. D. Scheuerell (2012) Analysis of multivariate time-series using the MARSS package. NOAA Fisheries, Northwest Fisheries Science Center, 2725 Montlake Blvd E., Seattle, WA 98112 Type RShowDoc("UserGuide",package="MARSS") to open a copy.

See Also

MARSS(), MARSS.marxss()

Examples

## Not run: 
dat <- t(harborSealWA[,-1])
# DFA with 3 states; used BFGS because it fits much faster for this model
fit <- MARSS(dat, model = list(m=3), form="dfa", method="BFGS")

# See the Dynamic Factor Analysis chapter in the User Guide
RShowDoc("UserGuide", package = "MARSS")

## End(Not run)

[Package MARSS version 3.11.9 Index]