lb_test: The Ljung-Box Test for Autocorrelations (LB test)

Description Usage Arguments Details Value References See Also Examples

Description

This function performs the Ljung-Box test for autocorrelations, and returns test statistics and associated p-values.

Usage

1
2
3
4
lb.test(obj, ...)

## S3 method for class 'lbtest'
print(x, digits = 3, ...)

Arguments

obj

a matrix of variables to be tested.

x

an object of the class "lbtest".

digits

the number of digits to be displayed.

...

optional arguments. Currently not in use.

Details

obj is usually a matrix of (the standardized) residuals from a GARCH estimation. When obj is squared residuals, the test is equivalent to the McLeord and Li (1983) test. lb.test() is a wrapper function to Box.test() with type = "Ljung".

Value

An S3 class object "lbtest" is returned. It contains the test statistics and associated p-values from lags 5 to 50 by 5.

References

Ljung, G.M. and G.E.P. Box (1978): “On a Measure of Lack of Fit in Time-Series Models”, Biometrika, 65, 297–303.

McLeod, A.I., and W.K. Li (1983): “Diagnostic checking ARMA time series models using squared-residual autocorrelations”, Journal of Time Series Analysis, 4, 269–273.

See Also

jb.test, residDiag

Examples

1
2
X <- matrix(rnorm(10000), 5000,2)
lb.test(X)

ccgarch2 documentation built on May 31, 2017, 4:23 a.m.