javanpst.tests.equality.CDTest
Class CDTest
- java.lang.Object
-
- javanpst.tests.StatisticalTest
-
- javanpst.tests.equality.CDTest.CDTest
-
public class CDTest extends StatisticalTest
The Charkraborti and Desu test (CD test) This test can be applied to test whether the median of several populations are equal or greater than the median of a control. The null hypotheses states equal medians, whereas alternative means that at least one median is greater than the control one. P-values are computed through the exact distribution of the test. A normal distribution approximation, with continuity correction, is also provided. All samples must have the same number of elements.
-
-
Constructor Summary
Constructors Constructor and Description CDTest()Default builderCDTest(DataTable newData)Builder.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidclearData()Clears the data stored in the testvoiddoTest()Performs the testdoublegetAsymptoticPValue()Get asymptotic p-valuedoublegetExactPValue()Get exact p-valuedoublegetW()Get W statisticdoublegetZ()Get control median valuejava.lang.StringprintData()Prints the data stored in the testjava.lang.StringprintReport()Prints a report with the results of the testvoidsetData(DataTable newData)Sets data to test-
Methods inherited from class javanpst.tests.StatisticalTest
isDataReady, isPerformed
-
-
-
-
Constructor Detail
-
CDTest
public CDTest()
Default builder
-
CDTest
public CDTest(DataTable newData)
Builder. Load data to test.- Parameters:
newData- data to test.
-
-
Method Detail
-
clearData
public void clearData()
Clears the data stored in the test- Specified by:
clearDatain classStatisticalTest
-
setData
public void setData(DataTable newData)
Sets data to test- Parameters:
newData- data to test.
-
doTest
public void doTest()
Performs the test- Specified by:
doTestin classStatisticalTest
-
getW
public double getW()
Get W statistic- Returns:
- W statistic
-
getZ
public double getZ()
Get control median value- Returns:
- median value
-
getExactPValue
public double getExactPValue()
Get exact p-value- Returns:
- exact p-value
-
getAsymptoticPValue
public double getAsymptoticPValue()
Get asymptotic p-value- Returns:
- asymptotic p-value
-
printData
public java.lang.String printData()
Prints the data stored in the test- Specified by:
printDatain classStatisticalTest- Returns:
- Data stored
-
printReport
public java.lang.String printReport()
Prints a report with the results of the test- Specified by:
printReportin classStatisticalTest- Returns:
- Output report
-
-
DMelt 3.0 © DataMelt by jWork.ORG