Class AndersonDarlingTest

java.lang.Object
edu.cmu.tetrad.data.AndersonDarlingTest

public class AndersonDarlingTest extends Object
Implements the Anderson-Darling test for normality, with P values calculated as in R's ad.test method (in package nortest).

Note that in the calculation, points x such that log(1 - normal_cdf(x)) is infinite are ignored.

Author:
josephramsey
  • Constructor Summary

    Constructors
    Constructor
    Description
    AndersonDarlingTest(double[] data)
    Constructs an Anderson-Darling test for the given column of data.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Constructs an Anderson-Darling test for the given column of data.
    double
    Constructs an Anderson-Darling test for the given column of data.
    double
    Constructs an Anderson-Darling test for the given column of data.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AndersonDarlingTest

      public AndersonDarlingTest(double[] data)
      Constructs an Anderson-Darling test for the given column of data.
      Parameters:
      data - the column of data to be analyzed.
  • Method Details

    • getASquared

      public double getASquared()
      Constructs an Anderson-Darling test for the given column of data.
      Returns:
      the A^2 statistic.
    • getASquaredStar

      public double getASquaredStar()
      Constructs an Anderson-Darling test for the given column of data.
      Returns:
      the A^2* statistic, which is the A^2 statistic adjusted heuristically for sample size.
    • getP

      public double getP()
      Constructs an Anderson-Darling test for the given column of data.
      Returns:
      the p value of the A^2* statistic, which is interpolated using exponential functions.