Learn R Programming

MARSS (version 3.2)

MARSSboot: Bootstrap MARSS Parameter Estimates

Description

Creates bootstrap parameter estimates and simulated (or bootstrapped) data (if appropriate). This is a base function in the MARSS-package.

Usage

MARSSboot(MLEobj, nboot = 1000, 
  output = "parameters", sim = "parametric", 
  param.gen = "MLE", control = NULL, silent = FALSE)

Arguments

MLEobj
An object of class marssMLE. Must have a $par element containing MLE parameter estimates.
nboot
Number of bootstraps to perform.
output
Output to be returned: "data", "parameters" or "all".
sim
Type of bootstrap: "parametric" or "innovations". See Details.
param.gen
Parameter generation method: "hessian" or "MLE".
control
The options in MLEobj$control are used by default. If supplied here, must contain all of the following: [object Object],[object Object],[object Object]
silent
Suppresses printing of progress bar.

Value

  • A list with the following components:
  • boot.paramsMatrix (number of params x nboot) of parameter estimates from the bootstrap.
  • boot.dataArray (n x t x nboot) of simulated (or bootstrapped) data (if requested and appropriate).
  • modelThe marssm object that was passed in via MLEobj$model.
  • nbootNumber of bootstraps performed.
  • outputType of output returned.
  • simType of bootstrap.
  • param.genParameter generation method: "hessian" or "KalmanEM".

Details

Approximate confidence intervals (CIs) on the model parameters can be calculated by numerically estimating the Hessian matrix (the matrix of partial 2nd derivatives of the parameter estimates). The Hessian CIs (param.gen="hessian") are based on the asymptotic normality of ML estimates under a large-sample approximation. CIs that are not based on asymptotic theory can be calculated using parametric and non-parametric bootstrapping (param.gen="MLE"). In this case, parameter estimates are generated by the ML estimates from each bootstrapped data set. The MLE method (kem or BFGS) is determined by MLEobj$method. Stoffer and Wall (1991) present an algorithm for generating CIs via a non-parametric bootstrap for state-space models (sim = "innovations"). The basic idea is that the Kalman filter can be used to generate estimates of the residuals of the model fit. These residuals are then standardized and resampled and used to generate bootstrapped data using the MARSS model and its maximum-likelihood parameter estimates. One of the limitations of the Stoffer and Wall algorithm is that it cannot be used when there are missing data, unless all data at time t are missing. An alternative approach is a parametric bootstrap (sim = "parametric"), in which the ML parameter estimates are used to produce bootstrapped data directly from the state-space model.

References

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. Stoffer, D. S., and K. D. Wall. 1991. Bootstrapping state-space models: Gaussian maximum likelihood estimation and the Kalman filter. Journal of the American Statistical Association 86:1024-1033. Cavanaugh, J. E., and R. H. Shumway. 1997. A bootstrap variant of AIC for state-space model selection. Statistica Sinica 7:473-496.

See Also

marssMLE marssm MARSSaic

Examples

Run this code
#nboot is set low in these examples in order to run quickly
  #normally nboot would be >1000 at least
  dat = t(harborSealnomiss)
  dat = dat[2:4,]
  #maxit set low to speed up the example
  kem = MARSS(dat, model=list(U="equal",Q=diag(.01,3)), 
     control=list(maxit=50))
  hess.list = MARSSboot(kem, param.gen="hessian", nboot=5)
  # (no missing values)
  boot.list = MARSSboot(kem, output="all", sim="innovations", nboot=5)

  # Parametric bootstrap CIs for data with missing values
  dat = t(harborSealWA)
  dat = dat[2:4,]
  kem = MARSS(dat, model=list(Q=diag(.01,3)), 
     control=list(maxit=50))
  boot.list = MARSSboot(kem, output="all", sim="parametric", nboot=5)

Run the code above in your browser using DataLab