Class BoxTest

java.lang.Object
smile.timeseries.BoxTest

public class BoxTest extends Object
Portmanteau test jointly that several autocorrelations of time series are zero.
  • Field Details

    • type

      public final BoxTest.Type type
      The type of test.
    • df

      public final int df
      The degree of freedom.
    • q

      public final double q
      Box-Pierce or Ljung-Box statistic.
    • pvalue

      public final double pvalue
      p-value
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • pierce

      public static BoxTest pierce(double[] x, int lag)
      Box-Pierce test.
      Parameters:
      x - time series
      lag - the statistic will be based on lag autocorrelation coefficients.
      Returns:
      the test results.
    • ljung

      public static BoxTest ljung(double[] x, int lag)
      Box-Pierce test.
      Parameters:
      x - time series
      lag - the statistic will be based on lag autocorrelation coefficients.
      Returns:
      the test results.