Learn R Programming

portes (version 1.08)

GetResiduals: Extract Residuals from Fitted ARIMA, VAR, or FGN 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", or "FitFGN" and returns the residuals and the order of the fitted object.

Usage

GetResiduals(obj)

Arguments

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

Value

  • List of order of fitted time series model and residuals from this model. The class of the residuals is ts.

See Also

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

Examples

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

Run the code above in your browser using DataLab