boot.residuals.arima {PRTest}R Documentation

generate residuals from a fitted arma model

Description

This function takes a fitted model, generates a simulated time series from that model and then fits the model using arima and returns the residuals.

Usage

boot.residuals.arima(obj, StableQ = FALSE)

Arguments

obj object of class Arima, that is the output from Arima
StableQ True, use stable innovations. Otherwise Gaussian innovations.

Details

The fitted model is simulated using SimulateARMA. When StableQ is true, the parameters of the stable distribution are estimated in the original fitted model using the residuals. These parameters are then used to generate innovations for the ARMA model. When StableQ is false, Gaussian innovations are used.

Value

a time series or vector of length n is produced, where n is the length of the residuals in the original fitted model.

Author(s)

A.I. McLeod

References

J.-W. Lin and McLeod (2007, accepted). Portmanteau Tests for ARMA Models with Infinite Variance. Journal of Time Series Analysis.

See Also

SimulateARMA

Examples

data(CRSP)
CRSP.AR5<-arima(CRSP, c(5,0,0))
acf(boot.residuals.arima(CRSP.AR5, StableQ=TRUE)

[Package PRTest version 1.0 Index]