Class LjungBox
- java.lang.Object
-
- dev.nm.stat.test.HypothesisTest
-
- dev.nm.stat.test.timeseries.portmanteau.BoxPierce
-
- dev.nm.stat.test.timeseries.portmanteau.LjungBox
-
public class LjungBox extends BoxPierce
The Ljung-Box test (named for Greta M. Ljung and George E. P. Box) is a portmanteau test for autocorrelated errors. A portmanteau test tests whether any of a group of autocorrelations of a time series are different from zero. The Ljung-Box statistic is better for all sample sizes including small ones. The Box-Pierce test statistic is a simplified version of the Ljung-Box statistic for which subsequent simulation studies have shown poor performance. The R equivalent function isBox.test
.
-
-
Constructor Summary
Constructors Constructor Description LjungBox(double[] x, int lag, int fitdf)
Perform the Ljung-Box test to check auto-correlation in a time series.
-
Method Summary
-
Methods inherited from class dev.nm.stat.test.timeseries.portmanteau.BoxPierce
getAlternativeHypothesis, getNullHypothesis, pValue, statistics
-
Methods inherited from class dev.nm.stat.test.HypothesisTest
isNullRejected, nGroups, nObs, oneSidedPvalue
-
-
-
-
Constructor Detail
-
LjungBox
public LjungBox(double[] x, int lag, int fitdf)
Perform the Ljung-Box test to check auto-correlation in a time series.- Parameters:
x
- a univariate time serieslag
- the number of lags to checkfitdf
- the degrees of freedom to be subtracted ifx
is a series of residuals
-
-