Learn R Programming

MARSS (version 3.2)

MARSSmcinit: Monte Carlo Initialization

Description

Performs a Monte Carlo search for optimal initial conditions iterative maximization algorithms (MARSSkem and MARSSoptim). This is a utility function in the MARSS-package.

Usage

MARSSmcinit(MLEobj)

Arguments

MLEobj
An object of class marssMLE.

Value

  • A list with 8 matrices Z, A, R, B, U, Q, x0, V0, specifying initial values for parameters for iteration 1 of the EM algorithm.

Details

It is recommended that initial parameter values be set using MARSSmcinit(), particularly if the model is not a good fit to the data. This requires more compuation time, but reduces the chance of the algorithm terminating at a local maximum and not reaching the true MLEs. Options for MARSSmcinit() may be set using MLEobj$control, as follows: [object Object],[object Object],[object Object] The default values for these are given in MARSSsettings.R and listed in MARSS.

References

The user guide: Holmes, E. E., E. J. Ward, and M. D. Scheuerell (2012) Analysis of multivariate time-series using the MARSS package. NOAA Fisheries, Northwest Fisheries Science Center, 2725 Montlake Blvd E., Seattle, WA 98112 Type RShowDoc("UserGuide",package="MARSS") to open a copy.

See Also

MARSSkem marssMLE MARSS

Examples

Run this code
#Note doing a Monte-Carlo search takes a long, long time
  dat = t(harborSeal)
  dat = dat[c(2,nrow(dat)),]
  fit1=MARSS(dat, control=list(MCInit=TRUE))
  fit1
  #Show the inits that were used
  fit1$start
  #Try fewer initial start locations and different mean variance (0.1 instead of 1) for R and Q
  fit2=MARSS(dat, control=list(MCInit=TRUE, numInits=10, numInitSteps = 10, boundsInits=list(Q=c(1,0.1),R=c(1,0.1))))
  fit2
  #Show the inits that were used
  fit2$start
  #ignore the values for Z,B, and V0; those parameters are fixed

Run the code above in your browser using DataLab