This function performs the Ljung-Box Test for a univariate time series.
a vector of variables to be tested
LB test statistics and associated p-values for lags 5, 10,..., 50.
x must be a vector. When
x is squared
residuals, the test is equivalent to the McLeord and Li (1983) test.
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.
1 2 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.