residuals {stochvolTMB}R Documentation

Calculate one-step-ahead (OSA) residuals for stochastic volatility model.

Description

This function is very time consuming and by default computes the one-step-ahead residual for the last 100 observations. See the function oneStepPredict and the paper in the references for more details.

Usage

residuals(object, conditional = 1:(object$nobs - 100), ...)

Arguments

object

A stochvolTMB object.

conditional

Index vector of observations that are fixed during OSA. By default the residuals of the last 100 observations are calculated. If set to NULL it will calculate one-step-ahead residuals for all observations.

...

Currently not used.

Value

Vector of one-step-ahead residuals. If the model is correctly specified, these should be standard normal.

References

https://www.researchgate.net/publication/316581864_Validation_of_ecological_state_space_models_using_the_Laplace_approximation


[Package stochvolTMB version 0.2.0 Index]