print.marssMLE {MARSS} | R Documentation |
Printing functions for MARSS MLE objects
Description
MARSS()
outputs marssMLE
objects. print(MLEobj)
, where MLEobj
is a marssMLE
object, will print out information on the fit. However, print
can be used to print a variety of information (residuals, smoothed states, imputed missing values, etc) from a marssMLE
object using the what
argument in the print call.
Usage
## S3 method for class 'marssMLE'
print(x, digits = max(3, getOption("digits")-4), ...,
what = "fit", form = NULL, silent = FALSE)
Arguments
x |
A marssMLE object.
|
digits |
Number of digits for printing.
|
... |
Other arguments for print.
|
what |
What to print. Default is "fit". If you input what as a vector, print returns a list. See examples.
- "model"
The model parameters with names for the estimated parameters. The output is customized by the form of the model that was fit. This info is in attr(x$model, "form") .
- "par"
A list of only the estimated values in each matrix. Each model matrix has it's own list element. Standard function: coef(x)
- "start" or "inits"
The values that the optimization algorithm was started at. Note, x$start shows this in form="marss" while print shows it in whatever form is in attr(x$model, "form") .
- "paramvector"
A vector of all the estimated values in each matrix. Standard function: coef(x, type="vector") . See coef() .
- "par.se","par.bias","par.lowCIs","par.upCIs"
A vector the estimated parameter standard errors, parameter bias, lower and upper confidence intervals. Standard function: MARSSparamCIs(x) See MARSSparamCIs() .
- "xtT" or "states"
The estimated states conditioned on all the data. x$states
- "data"
The data. This is in x$model$data
- "logLik"
The log-likelihood. Standard function: x$logLik . See MARSSkf() for a discussion of the computation of the log-likelihood for MARSS models.
- "ytT"
The expected value of the data conditioned on all the data. Returns the data if present and the expected value if missing. This is in x$ytT (ytT is analogous to xtT).
- "states.se"
The state standard errors. x$states.se
- "states.cis"
Approximate confidence intervals for the states. See MARSSparamCIs() .
- "model.residuals"
The one-step ahead model residuals or innovations. \mathbf{y}_t - \textrm{E}[\mathbf{Y}_t|\mathbf{y}_1^{t-1}] , aka actual data at time t minus the expected value of the data conditioned on the data from t=1 to t-1 . Standard function: residuals(x, type="tt1") See MARSSresiduals() for a discussion of residuals in the context of MARSS models.
- "state.residuals"
The smoothed state residuals. \mathbf{x}_t^T- \textrm{E}[\mathbf{X}_t|\mathbf{x}_{t-1}^T] , aka the expected value of the states at time t conditioned on all the data minus the expected value of the states at time t conditioned on \mathbf{x}_{t-1}^T] . Standard function: residuals(x, type="tT") See MARSSresiduals() .
- parameter name
Returns the parameter matrix for that parameter with fixed values at their fixed values and the estimated values at their estimated values. Standard function: coef(x, type="matrix")$elem
- "kfs"
The Kalman filter and smoother output. See MARSSkf() for a description of the output. The full kf output is not normally attached to the output from a MARSS() call. This will run the filter/smoother if needed and return the list invisibly. So assign the output as foo=print(x,what="kfs")
- "Ey"
The expectations involving y conditioned on all the data. See MARSShatyt() for a discussion of these expectations. This output is not normally attached to the output from a MARSS() call–except ytT which is the predicted value of any missing y. The list is returned invisibly so assign the output as foo=print(x,what="Ey") .
|
form |
By default, print uses the model form specified in the call to MARSS() . This information is in attr(marssMLE$model, "form") , however you can specify a different form. form="marss" should always work since this is the model form in which the model objects are stored (in marssMLE$marss ).
|
silent |
If TRUE, do not print just return the object. If print call is assigned, nothing will be printed. See examples. If what="fit" , there is always output printed.
|
Value
A print out of information. If you assign the print call to a value, then you can reference the output. See the examples.
Author(s)
Eli Holmes, NOAA, Seattle, USA.
Examples
dat <- t(harborSeal)
dat <- dat[c(2,11),]
MLEobj <- MARSS(dat)
print(MLEobj)
print(MLEobj, what="model")
print(MLEobj,what="par")
#silent doesn't mean silent unless the print output is assigned
print(MLEobj, what="paramvector", silent=TRUE)
tmp <- print(MLEobj, what="paramvector", silent=TRUE)
#silent means some info on what you are printing is shown whether
#or not the print output is assigned
print(MLEobj, what="paramvector", silent=FALSE)
tmp <- print(MLEobj, what="paramvector", silent=FALSE)
cis <- print(MLEobj, what="states.cis")
cis$up95CI
vars <- print(MLEobj, what=c("R","Q"))
[Package
MARSS version 3.11.9
Index]