Class GeneralAndersonDarlingTest

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

public class GeneralAndersonDarlingTest extends Object
Implements the Anderson-Darling test against the given CDF, 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 - dist.get(x))) is infinite are ignored.

Version:
$Id: $Id
Author:
josephramsey
  • Constructor Details

    • GeneralAndersonDarlingTest

      public GeneralAndersonDarlingTest(List<Double> data, org.apache.commons.math3.distribution.RealDistribution dist)
      Constructs an Anderson-Darling test for the given column of data.
      Parameters:
      data - a List object
      dist - a RealDistribution object
  • Method Details

    • main

      public static void main(String[] args)

      main.

      Parameters:
      args - an array of String objects
    • getASquared

      public double getASquared()

      Getter for the field aSquared.

      Returns:
      the A^2 statistic.
    • getASquaredStar

      public double getASquaredStar()

      Getter for the field aSquaredStar.

      Returns:
      the A^2* statistic, which is the A^2 statistic adjusted heuristically for sample size.
    • getP

      public double getP()

      Getter for the field p.

      Returns:
      the p value of the A^2* statistic, which is interpolated using exponential functions.
    • getProbTail

      public double getProbTail(double n, double z)

      getProbTail.

      Parameters:
      n - a double
      z - a double
      Returns:
      a double