Ljung-Box test for no autocorrelation
Parameters : | x : array_like, 1d
lags : None, int or array_like
boxpierce : {False, True}
|
---|---|
Returns : | lbvalue : float or array
pvalue : float or array
bpvalue : (optionsal), float or array
bppvalue : (optional), float or array
|
Notes
Ljung-Box and Box-Pierce statistic differ in their scaling of the autocorrelation function. Ljung-Box test is reported to have better small sample properties.
could be extended to work with more than one series 1d or nd ? axis ? ravel ? needs more testing
‘’Verification’‘
Looks correctly sized in Monte Carlo studies. not yet compared to verified values
References
Greene Wikipedia
Examples
see example script