MARSSvectorizeparam: Vectorize or Replace the par List

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Converts MLEobj[["what"]] to a vector or assigns a vector to MLEobj[["what"]]. This is a utility function in the MARSS-package for marssMODEL objects of form="marss" and is not exported. Users achieve this functionality with coef.marssMLE.

Usage

1
MARSSvectorizeparam(MLEobj, parvec = NA, what="par")

Arguments

MLEobj

An object of class marssMLE.

parvec

NA or a vector. See Value.

what

What part of the MLEobj is being replaced or vectorized. Need to be a par list.

Details

Utility function to generate parameter vectors for optimization functions, and to set MLEobj[[what]] using a vector of values. The function bases the unlisting and naming order on names(MLEobj$marss$fixed). Appends matrix name to the row names in the par list.

Value

If parvec=NA, a vector of the elements of the what element. Otherwise, a marssMLE object with MLEobj[["what"]] set by parvec.

Author(s)

Eli Holmes and Kellie Wills, NOAA, Seattle, USA.

eli(dot)holmes(at)noaa(dot)gov, eric(dot)ward(at)noaa(dot)gov

See Also

marssMLE

Examples

1
2
3
4
5
  dat = t(harborSealWA)
  dat = dat[2:4,]
  kem = MARSS(dat)
  paramvec = MARSS:::MARSSvectorizeparam(kem)
  paramvec

gragusa/MARSS documentation built on May 17, 2019, 8:18 a.m.