Learn R Programming

fGarch (version 4033.92)

residuals-methods: Extract GARCH model residuals

Description

Extracts residuals from a fitted GARCH object.

Usage

# S4 method for 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.

Author

Diethelm Wuertz for the Rmetrics R-port

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.

See Also

fitted, predict, garchFit, class fGARCH,

Examples

Run this code
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)

Run the code above in your browser using DataLab