residuals_marssMLE: MARSS Standardized Residuals

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

Description

Calculates the standardized (or auxilliary) residuals sensu Harvey, Koopman and Penzer (1998).

Usage

1
2
## S3 method for class 'marssMLE'
residuals(object,...)

Arguments

object

An object of class marssMLE.

...

Not used.

Details

Uses the algorithm on page 112 of Harvey, Koopman and Penzer (1998) to compute the standardized model residuals.

Value

A list with the following components

model.residuals

The smoothed model residuals y(t)-E(y(t)|y(1:T),Theta), where Theta is the set of model parameters. Sometimes called the smoothations. This is different than the Kalman filter innovations which are y(t)-E(y(t)|y(1:t-1),Theta).

state.residuals

The smoothed stated residuals E(x(t)|y(1:T))-E(x(t)|E(x(t-1)|y(1:T))).

residuals

The model residuals as a (n+m) x TT matrix with model.residuals on top and model.residuals below. model.residuals is hat(eta_t) on page 112 of Harvey, Koopman and Penzer (1998).

var.residuals

The variance of the model residuals as a (n+m) x (n+m) x TT matrix. This is var(hat(model.residuals)).

std.residuals

The standardized model residuals as a (n+m) x TT matrix. This is residuals divided by the square root of var.residuals — although the code is using the matrix equivalent of that equation.

Author(s)

Eli Holmes, NOAA, Seattle, USA.

eli(dot)holmes(at)noaa(dot)gov

References

Harvey, A., S. J. Koopman, and J. Penzer. 1998. Messy time series: a unified approach. Advances in Econometrics 13: 103-144 (see page 112).

Koopman, S. J., N. Shephard, and J. A. Doornik. 1999. Statistical algorithms for models in state space using SsfPack 2.2. Econometrics Journal 2: 113-166. (see pages 147-148).

See Also

MARSSkem marssMLE

Examples

1
2
3
4
5
6
7
8
9
  dat = t(harborSeal)
  dat = dat[c(2,11),]
  MLEobj = MARSS(dat)
  
  #not standardized model residuals
  residuals(MLEobj)$model.residuals

  #standardized (by variance) model & state residuals
  residuals(MLEobj)$std.residuals

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