methods-residuals: Extract GARCH model residuals

residuals-methodsR Documentation

Extract GARCH model residuals

Description

Extracts residuals from a fitted GARCH object.

Usage

## S4 method for signature 'fGARCH'
residuals(object, standardize = FALSE)

Arguments

object

an object of class "fGARCH" as returned by garchFit.

standardize

a logical, indicating if the residuals should be standardized.

Details

The "fGARCH" method extracts the @residuals slot from an object of class "fGARCH" as returned by the function garchFit and optionally standardizes them, using conditional standard deviations.

Author(s)

Diethelm Wuertz for the Rmetrics R-port

See Also

fitted, predict, garchFit, class fGARCH,

Examples

stopifnot(require("timeSeries"))
## Swiss Pension fund Index
data(LPP2005REC, package = "timeSeries")
x <- as.timeSeries(LPP2005REC)

## Fit LPP40 Bechmark:
fit <- garchFit(LPP40 ~ garch(1, 1), data = 100*x, trace = FALSE)
fit

fitted <- fitted(fit)
head(fitted)
class(fitted)

res <- residuals(fit)
head(res)
class(res)

fGarch documentation built on May 29, 2024, 8:30 a.m.