McLeod.Li.test: McLeod-Li test

Description Usage Arguments Details Value Author(s) References Examples

Description

Perform the McLeod-Li test for conditional heteroscedascity (ARCH).

Usage

1
2
McLeod.Li.test(object, y, gof.lag, col = "red", omit.initial = TRUE, 
plot = TRUE, ...)

Arguments

object

a fitted Arima model, ususally the output from the arima function. If supplied, then the Mcleod-Li test is applied to the residuals of the model, and the y-argument is ignored.

y

time series data with which one wants to test for the presence of conditional heteroscedascity

gof.lag

maximum number of lags for which the test is carried out.

col

color of the reference line

omit.initial

suppress the initial (d+Ds) residuals if set to be TRUE

plot

suppress plotting if set to be FALSE

...

other arguments to be passed to the plot function

Details

The test checks for the presence of conditional heteroscedascity by computing the Ljung-Box (portmanteau) test with the squared data (if y is supplied and object suppressed) or with the squared residuals from an arima model (if an arima model is passed to the function via the object argument.)

Value

pvlaues

the vector of p-values for the Ljung-Box test statistics computed using the first m lags of the ACF of the squared data or residuals, for m ranging from 1 to gof.lag.

Author(s)

Kung-Sik Chan

References

McLeod, A. I. and W. K. Li (1983). Diagnostic checking ARMA time series models using squared residual autocorrelations. Journal of Time Series Analysis, 4, 269273.

Examples

1
2
3
data(CREF)
r.cref=diff(log(CREF))*100
McLeod.Li.test(y=r.cref)

Example output

Loading required package: leaps
Loading required package: locfit
locfit 1.5-9.1 	 2013-03-22
Loading required package: mgcv
Loading required package: nlme
This is mgcv 1.8-17. For overview type 'help("mgcv-package")'.
Loading required package: tseries

Attaching package: 'TSA'

The following objects are masked from 'package:stats':

    acf, arima

The following object is masked from 'package:utils':

    tar

TSA documentation built on May 30, 2017, 12:11 a.m.