
Tests marssMLE object for completeness
is_marssMLE.RdTests a marssMLE object for completeness to determine if it has all the pieces and attributes necessary to be passed to MARSS functions for fitting, filtering, smoothing, or displaying. Internal function, use MARSS::: to access. This is a very slow function which should not be called repeatedly in a for loop for example.
Arguments
- MLEobj
An object of class
marssMLE. See Details.
Details
The is.marssMLE() function checks components marss, start and control, which must be present for estimation by functions e.g. MARSSkem(). Components returned from estimation must include at least method, par, kf, numIter, convergence and logLik. Additional components (e.g. AIC) may be returned, as described in function help files.
modelAn object of class
marssMODELin whatever form the user specified in the call toMARSS(). Default is form "marxss".marssAn object of class
marssMODELin "marss" forms, needed for all the base MARSS functions.startList with matrices specifying initial values for parameters to be used (if needed) by the maximization algorithm.
BInitial value(s) for \(\mathbf{B}\) matrix (m x m).
UInitial value(s) for \(\mathbf{u}\) matrix (m x 1).
QInitial value(s) for \(\mathbf{Q}\) variance-covariance matrix (m x m).
ZInitial value(s) for \(\mathbf{Z}\) matrix (n x m).
AInitial value(s) for \(\mathbf{a}\) matrix (n x 1).
RInitial value(s) for \(\mathbf{R}\) variance-covariance matrix (n x n).
x0Initial value(s) for initial state vector (m x 1).
V0Initial variance(s) for initial state variance (m x m).
controlA list specifying estimation options. The following options are needed by
MARSSkem(). Other control options can be set if needed for other estimation methods, e.g. the control options listed foroptimfor use withMARSSoptim(). The default values for control options are set inalldefaults[[method]]which is specified inMARSSsettings.R.minitThe minimum number of iterations to do in the maximization routine (if needed by method).
maxitMaximum number of iterations to be used in the maximization routine (if needed by method).
min.iter.conv.testMinimum iterations to run before testing convergence via the slope of the log parameter versus log iterations.
conv.test.deltaT=9Number of iterations to use for the testing convergence via the slope of the log parameter versus log iterations.
conv.test.slope.tolThe slope of the log parameter versus log iteration to use as the cut-off for convergence. The default is 0.5 which is a bit high. For final analyses, this should be set lower.
abstolThe logLik.(iter-1)-logLik.(iter) convergence tolerance for the maximization routine. Both the abstol and the slope of the log of the parameters versus the log iteration tests must be met for convergence.
traceA positive integer. If not 0, a record will be created during maximization iterations (what's recorded depends on method of maximization). -1 turns off most internal error checking.
safeLogical. If TRUE, then the Kalman filter is run after each update equation in the EM algorithm. This slows down the algorithm. The default is FALSE.
allow.degenIf TRUE, replace \(\mathbf{Q}\) or \(\mathbf{R}\) diagonal elements by 0 when they become very small.
min.degen.iterNumber of iterations before trying to set a diagonal element of \(\mathbf{Q}\) or \(\mathbf{R}\) to zero).
degen.limHow small the \(\mathbf{Q}\) or \(\mathbf{R}\) diagonal element should be before attempting to replace it with zero.
silentSuppresses printing of progress bar, error messages and convergence information.
methodA string specifying the estimation method. MARSS allows "kem" for EM and "BFGS" for quasi-Newton.
Once the model has been fitted, additional elements are added.
parA list with 8 matrices of estimated parameter values Z, A, R, B, U, Q, x0, V0.
statesExpected values of the x (hidden states).
states.seStandard errors on the estimates states.
ytTExpected values of the y. This is just y for non-missing y.
ytT.seStandard errors on the ytT. This will be 0 for non-missing y.
kfA list containing Kalman filter/smoother output if
control$traceis > 0.EyA list containing expectations involving y. Output if
control$traceis > 0.numIterNumber of iterations which were required for convergence.
convergenceConvergence status and errors. 0 means converged successfully. Anything else means an error or warning.
logLikLog-likelihood.
AICAIC
AICcCorrected AIC.
callA list of all the arguments passed into the MARSS call. Not required for most functions, but is a record of what was used to call MARSS for checking and can be used to customize the printing of MARSS output.