Learn R Programming

MARSS (version 3.10.12)

coef.marssMLE: Coefficient function for MARSS MLE objects

Description

MARSS() outputs marssMLE objects. coef(MLEobj), where MLEobj is one's output from a MARSS() call, will print out the estimated parameters. The default output is a list with values for each parameter, however the output can be altered using the type argument to output a vector of all the estimated values (type="vector") or a list with the full parameter matrix with the estimated and fixed elements (type="matrix").

Usage

# S3 method for marssMLE
coef(object, ..., type="list", form=NULL, what="par")

Arguments

object

A marssMLE object.

...

Other arguments for coef.

type

What to print. Default is "list". If you input type as a vector, coef returns a list of output. See examples.

  • "list" A list of only the estimated values in each matrix. Each model matrix has it's own list element.

  • "vector" A vector of all the estimated values in each matrix.

  • "matrix" A list of the parameter matrices each parameter with fixed values at their fixed values and the estimated values at their estimated values. Time-varying parameters, including d and c in a marxss form model, are returned as an array with time in the 3rd dimension.

  • parameter name Returns the parameter matrix for that parameter with fixed values at their fixed values and the estimated values at their estimated values. Note, time-varying parameters, including d and c in a marxss form model, are returned as an array with time in the 3rd dimension.

form

By default, the model form specified in the call to MARSS() is used to determine how to display the coefficients. This information is in attr(object$model,"form") . The default form is "marxss"; see MARSS.marxss. However, the internal functions convert this to form "marss"; see MARSS.marss. The marss form of the model is stored (in object$marss). You can look at the coefficients in marss form by passing in form="marss". This is mainly useful is for debugging numerical problems since the error reports will be for the "marss" form.

what

By default, coef shows the parameter estimates. Other options are "par.se", "par.lowCI", "par.upCI", "par.bias", and "start".

Value

A list of the estimated parameters for each model matrix.

See Also

augment.marssMLE, tidy.marssMLE, print.marssMLE

Examples

Run this code
# NOT RUN {
dat <- t(harborSeal)
dat <- dat[c(2, 11), ]
MLEobj <- MARSS(dat)

coef(MLEobj)
coef(MLEobj, type = "vector")
coef(MLEobj, type = "matrix")
# to retrieve just the Q matrix
coef(MLEobj, type = "matrix")$Q
# }

Run the code above in your browser using DataLab