form="dfa" to MARSS() invokes a helper function to create that model and creates the Z matrix for the user. Q is by definition identity, x0 is zero and V0 is diagonal with large variance (5). U is zero, A is zero, and covariates only enter the Y equation. Because U and A are 0, the data should have mean 0 (de-meaned) 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 ).marssMLE. See print.marssMLE 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.MARSS(y,
inits=NULL,
model=NULL,
miss.value=as.numeric(NA),
method = "kem",
form = "dfa",
fit=TRUE,
silent = FALSE,
control = NULL,
MCbounds = NULL,
fun.kf = "MARSSkfas",
demean = TRUE,
z.score = TRUE)model argument is a list. The following details what list elements can be passed in:
B"Identity". Can be "identity", "diagonal and equal", or "diagonal and unequal".U"Zero". Cannot be changed or passed in via model argument.Q"Identity". Can be "identity", "diagonal and equal", or "diagonal and unequal".ZCan be passed in as a (list) matrix if the user does not want a default DFAZmatrix. There are many equivalent ways to construct a DFAZmatrix. The default is Zuur et al.'s form (see User Guide).ADefault="zero". Can be "unequal", "zero" or a matrix.RDefault="diagonal and equal". Can be set to "identity", "zero", "unconstrained", "diagonal and unequal", "diagonal and equal", "equalvarcov", or a (list) matrix to specify general forms.x0Default="zero". Can be "unconstrained", "unequal", "zero", or a (list) matrix.V0Default=diagonal matrix with 5 on the diagonal. Can be "identity", "zero", or a matrix.tinitxDefault=0. Can be 0 or 1. Tells MARSS whether x0 is at t=0 or t=1.mDefault=1. Can be 1 to n (the number of y time-series). Must be integer.form="dfa".RShowDoc("UserGuide",package="MARSS") to open a copy.MARSS MARSS.marxss#See the Dynamic Factor Analysis chapter in the User Guide
RShowDoc("UserGuide",package="MARSS")Run the code above in your browser using DataLab