Package edu.cmu.tetrad.data
Class GeneralAndersonDarlingTest
java.lang.Object
edu.cmu.tetrad.data.GeneralAndersonDarlingTest
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 SummaryConstructorsConstructorDescriptionGeneralAndersonDarlingTest(List<Double> data, org.apache.commons.math3.distribution.RealDistribution dist) Constructs an Anderson-Darling test for the given column of data.
- 
Method SummaryModifier and TypeMethodDescriptiondoubleGetter for the fieldaSquared.doubleGetter for the fieldaSquaredStar.doublegetP()Getter for the fieldp.doublegetProbTail(double n, double z) Computes the probability of the tail for a given value of sample size and AD test statistic values as given in Marsaglia, G., & Marsaglia, J.static voidmain.
- 
Constructor Details
- 
Method Details- 
mainmain. - Parameters:
- args- an array of- Stringobjects
 
- 
getASquaredpublic double getASquared()Getter for the field aSquared.- Returns:
- the A^2 statistic.
 
- 
getASquaredStarpublic double getASquaredStar()Getter for the field aSquaredStar.- Returns:
- the A^2* statistic, which is the A^2 statistic adjusted heuristically for sample size.
 
- 
getPpublic double getP()Getter for the field p.- Returns:
- the p value of the A^2* statistic, which is interpolated using exponential functions.
 
- 
getProbTailpublic double getProbTail(double n, double z) Computes the probability of the tail for a given value of sample size and AD test statistic values as given in Marsaglia, G., & Marsaglia, J. (2004). Evaluating the anderson-darling distribution. Journal of statistical software, 9, 1-5.- Parameters:
- n- the sample size.
- z- the test statistic value.
- Returns:
- the computed tail probability as a double.
 
 
-