Learn R Programming

MARSS (version 3.2)

MARSSvectorizeparam: Vector to Parameter Matrix Conversion

Description

Converts MLEobj$par to a vector of the estimated parameter elements and vice versa. This is a utility function in the MARSS-package.

Usage

MARSSvectorizeparam(MLEobj, parvec = NA)

Arguments

MLEobj
An object of class marssMLE.
parvec
NA or a vector. See Value.

Value

  • If parvec=NA, a vector of estimated parameters. Otherwise, a marssMLE object with $par set by parvec.

Details

Utility function to generate parameter vectors for optimization functions, and to set MLEobj$par using a vector of parameter values (only the estimated values).

See Also

marssMLE

Examples

Run this code
dat = t(harborSealWA)
  dat = dat[2:4,]
  kem = MARSS(dat)
  paramvec = MARSSvectorizeparam(kem)
  paramvec

Run the code above in your browser using DataLab