javanpst.tests.countData.contingencyCoefficient
Class ContingencyCoefficient
- java.lang.Object
-
- javanpst.tests.StatisticalTest
-
- javanpst.tests.countData.contingencyCoefficient.ContingencyCoefficient
-
public class ContingencyCoefficient extends StatisticalTest
A contingency coefficient-based test. This procedure test that row and columns of a n x m contingency coefficient are independent or have no association. Q statistic (approximated to a chi-square distribution) and C and Phi coefficients are computed.
-
-
Constructor Summary
Constructors Constructor and Description ContingencyCoefficient()Default builderContingencyCoefficient(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()Perform the testdoublegetC()Get C contingency coefficientdoublegetPhi()Get phi contingency coefficientdoublegetPValue()Get p-valuedoublegetQ()Get Q statisticjava.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
-
ContingencyCoefficient
public ContingencyCoefficient()
Default builder
-
ContingencyCoefficient
public ContingencyCoefficient(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()
Perform the test- Specified by:
doTestin classStatisticalTest
-
getQ
public double getQ()
Get Q statistic- Returns:
- Q statistic
-
getC
public double getC()
Get C contingency coefficient- Returns:
- C contingency coefficient
-
getPhi
public double getPhi()
Get phi contingency coefficient- Returns:
- phi contingency coefficient
-
getPValue
public double getPValue()
Get p-value- Returns:
- p-value computed
-
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