Class 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 is Box.test.
    See Also:
    • 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 series
        lag - the number of lags to check
        fitdf - the degrees of freedom to be subtracted if x is a series of residuals