| is.marssMLE | R Documentation |
Tests 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.
is.marssMLE(MLEobj)
MLEobj |
An object of class |
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.
model An object of class marssMODEL in whatever form the user specified in the call to MARSS(). Default is form "marxss".
marss An object of class marssMODEL in "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.
B Initial value(s) for \mathbf{B} matrix (m x m).
U Initial value(s) for \mathbf{u} matrix (m x 1).
Q Initial value(s) for \mathbf{Q} variance-covariance matrix (m x m).
Z Initial value(s) for \mathbf{Z} matrix (n x m).
A Initial value(s) for \mathbf{a} matrix (n x 1).
R Initial 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).
control A 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 for optim for use with MARSSoptim(). The default values for control options are set in alldefaults[[method]] which is specified in MARSSsettings.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.degen If TRUE, replace \mathbf{Q} or \mathbf{R} diagonal elements by 0 when they become very small.
min.degen.iter Number of iterations before trying to set a diagonal element of \mathbf{Q} or \mathbf{R} to zero).
degen.lim How 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.
kf A list containing Kalman filter/smoother output if control$trace is > 0.
Ey A list containing expectations involving y. Output if control$trace is > 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.
TRUE if no problems; otherwise a message describing the problems.
Eli Holmes and Kellie Wills, NOAA, Seattle, USA.
marssMODEL, MARSSkem()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.