Learn R Programming

portes (version 2.1-3)

GetResiduals: Extract Residuals from ARIMA, VAR, FGN, GARCH, or any Fitted Time Series Model

Description

This utility function is useful to use in the portmanteau functions, BoxPierce, gvtest, Hosking, LiMcLeod, LjungBox, and portest. It takes a fitted time-series object with class "ar", "arima0", "Arima", "varest", "FitAR", "FitFGN", "garch", "fGARCH", or "list". and returns the residuals and the order from the fitted object.

Usage

GetResiduals(obj)

Arguments

obj
a fitted time-series model with class "ar", "arima0", "Arima", "varest", "FitAR", "FitFGN", "garch", "fGARCH", or "list".

Value

List of order of fitted time series model and residuals from this model.

See Also

BoxPierce, gvtest, Hosking, LiMcLeod, LjungBox, ar, arima0, arima, Arima, FitAR, VAR, FitFGN, garch, garchFit, tar

Examples

Run this code
fit <- arima(Nile, c(1, 0, 1))
GetResiduals(fit)

Run the code above in your browser using DataLab