powered by
Performs Ljung-Box Test for white noise
ljung.wge(x, K = 24, p = 0, q = 0)
Name of test for output: Ljung-Box Test
Maximum lag : same as input value
Value of chi-square statistic
Degrees of freedom = K-p-q
pvalue for testing null hypothesis of white noise
Realization to assess for white noise
Maximum lag for sample autocorrelations to be used in test
If x is a realization of residuals from an ARMA(p,q) fit then p=AR order. Otherwise, p=0
If x is a realization of residuals from an ARMA(p,q) fit then q=MA order. Otherwise, q=0
Wayne Woodward
"Applied Time Series Analysis with R, 2nd edition" by Woodward, Gray, and Elliott
data(fig1.22a) ljung.wge(fig1.22a, K=24,p=0,q=0)
Run the code above in your browser using DataLab