arch.test: The ARCH effect test function.

View source: R/test.R

arch.testR Documentation

The ARCH effect test function.

Description

Performs the Pormanteau Q and Lagrange Multipliers test for homoscedasticity in a univariate stationary process. The null hypothesis (H0), is that the process is homoscedastic.

Usage

arch.test(y, arch = c("box","Lm"), alpha = 0.05, lag.max = 2)

Arguments

y

a numeric vector or an object of the ts class containing a stationary time series.

arch

A character string naming the desired test for checking stationarity. Valid values are "box" for the Ljung-Box, and "Lm" for the Lagrange Multiplier test. The default value is "box" for the Augmented Ljung-Box test.

alpha

Level of the test, possible values range from 0.01 to 0.1. By default alpha = 0.05 is used

lag.max

an integer with the number of used lags.

Details

Several different tests are available: Performs Portmanteau Q and Lagrange Multiplier tests for the null hypothesis that the residuals of an ARIMA model are homoscedastic. The ARCH test is based on the fact that if the residuals (defined as e(t)) are heteroscedastic, the squared residuals (e^2[t]) are autocorrelated. The first type of test is to examine whether the squares of residuals are a sequence of white noise, which is called the Portmanteau Q test, and similar to the Ljung-Box test on the squared residuals. By default, alpha = 0.05 is used to select the more likely hypothesis.

Value

A list with class "h.test" containing the following components:

statistic:

the test statistic.

parameter:

the test degrees freedoms.

p.value:

the p-value for the test.

alternative:

a character string describing the alternative hypothesis.

method:

a character string with the test name.

data.name:

a character string giving the name of the data.

Author(s)

Asael Alonzo Matamoros

References

Engle, R. F. (1982). Auto-regressive Conditional Heteroscedasticity with Estimates of the Variance of United Kingdom Inflation. Econometrica. 50(4), 987-1007.

McLeod, A. I. & W. K. Li. (1984). Diagnostic Checking ARMA Time Series Models Using Squared-Residual Auto-correlations. Journal of Time Series Analysis. 4, 269-273.

See Also

normal.test, seasonal.test, uroot.test

Examples

#  stationary  ar process
y = arima.sim(100,model = list(ar = 0.3))
arch.test(y)


nortsTest documentation built on May 29, 2024, 10:05 a.m.