org.statcato.statistics.inferential.nonparametrics
Class RankCorrelation
- java.lang.Object
-
- org.statcato.statistics.inferential.nonparametrics.RankCorrelation
-
public class RankCorrelation extends java.lang.ObjectSpearman's rank correlation between two variables. Computes the correlation between two variables using their ranks.- Since:
- 1.0
- See Also:
CorrelationRegression
-
-
Constructor Summary
Constructors Constructor and Description RankCorrelation(java.util.Vector<java.lang.Double> x, java.util.Vector<java.lang.Double> y, double sig)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doubleCriticalValue()Returns the critical value for r corresponding to the given significance.intN()Returns the number of data pairsdoublePValue()Returns the p-Value corresponding to the test statistic.doubleRankCorrelationCoeff()Returns the rank correlation coefficient.java.lang.StringtoString()
-
-
-
Constructor Detail
-
RankCorrelation
public RankCorrelation(java.util.Vector<java.lang.Double> x, java.util.Vector<java.lang.Double> y, double sig)Constructor. The x and y variables are provided as vectors of double type of the same length. The values in the two vectors at the same position are considered to be a data point. The signifiance level of the test is also provided.- Parameters:
x- variable 1y- variable 2sig- significance
-
-
Method Detail
-
N
public int N()
Returns the number of data pairs- Returns:
- n
-
RankCorrelationCoeff
public double RankCorrelationCoeff()
Returns the rank correlation coefficient.- Returns:
- rs
-
CriticalValue
public double CriticalValue()
Returns the critical value for r corresponding to the given significance.- Parameters:
significance- significance- Returns:
- critical value (positive)
-
PValue
public double PValue()
Returns the p-Value corresponding to the test statistic.- Returns:
- p-Value
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-
DMelt 3.0 © DataMelt by jWork.ORG