ljung_box_test: The Ljung-Box Test statistic

Description Usage Arguments Value Note References See Also Examples

Description

This function performs the Ljung-Box Test for a univariate time series.

Usage

1

Arguments

x

a vector of variables to be tested

Value

LB test statistics and associated p-values for lags 5, 10,..., 50.

Note

Argument x must be a vector. When x is squared residuals, the test is equivalent to the McLeord and Li (1983) test.

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

rob.sk, rob.kr, jb.test

Examples

1
2
3
x <- rnorm(1000)
ljung.box.test(x)           # returns the LB Test statistic
ljung.box.test(x^2)         # returns the McLeord-Li Test for no-ARCH effect

hoanguc3m/ccgarch documentation built on May 29, 2019, 11:05 p.m.