javanpst.tests.bivariate.danielTrendTest
Class DanielTrendTest
- java.lang.Object
-
- javanpst.tests.StatisticalTest
-
- javanpst.tests.bivariate.danielTrendTest.DanielTrendTest
-
public class DanielTrendTest extends StatisticalTest
The Daniel Trend test. This test computes Spearman's correlation coefficient to measure association between bivariate samples. Two samples, with 3 o more values are needed. A exact p-value is computed if the size of the sample is equal or lower than 10. If the size is between 11 and 30, a quantile approximation is computed. Ties are broken arbitrarily. Furthermore, an asymptotic p-value, measuring positive, negative, and no dependence is computed for any sample size.
-
-
Constructor Summary
Constructors Constructor and Description DanielTrendTest()Default builderDanielTrendTest(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 testdoublegetExactPValue()Get exact p-valuedoublegetNegativeDependencePvalue()Get negative dependence p-valuedoublegetNoDependencePvalue()Get no dependence p-valuedoublegetPositiveDependencePvalue()Get positive dependence p-valuedoublegetR()Get R statistic (Spearman's correlation coefficient)doublegetZ()Get Z 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
-
DanielTrendTest
public DanielTrendTest()
Default builder
-
DanielTrendTest
public DanielTrendTest(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
-
getR
public double getR()
Get R statistic (Spearman's correlation coefficient)- Returns:
- R statistic
-
getZ
public double getZ()
Get Z statistic- Returns:
- Z statistic
-
getExactPValue
public double getExactPValue()
Get exact p-value- Returns:
- exact p-value
-
getPositiveDependencePvalue
public double getPositiveDependencePvalue()
Get positive dependence p-value- Returns:
- positive dependence p-value
-
getNegativeDependencePvalue
public double getNegativeDependencePvalue()
Get negative dependence p-value- Returns:
- negative dependence p-value
-
getNoDependencePvalue
public double getNoDependencePvalue()
Get no dependence p-value- Returns:
- negative dependence 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