org.statcato.statistics.inferential.nonparametrics
Class WilcoxonSignedRankPValue
- java.lang.Object
-
- org.statcato.statistics.inferential.nonparametrics.WilcoxonSignedRankPValue
-
public class WilcoxonSignedRankPValue extends java.lang.ObjectA class that computes p-values and critical values for Wilcoxon Signed Rank Test using exact and normal approximation methods.- Since:
- 1.0
-
-
Field Summary
Fields Modifier and Type Field and Description static boolean[]calculatedOne-dimensional array of boolean values indicating whether the p-values for each sample size are calculated.static intMAX_NThe maximum sample size calculated using exact method.static intMAX_SUMThe maximum rank sum given the maximum sample size.static double[][]pvalueTwo-dimensional array of double values representing the cumulative p-values of each rank sum corresponding to the sample size.static int[][]sumTwo-dimensional array of integers representing the number of occurrences of each rank sum corresponding to the sample size.
-
Constructor Summary
Constructors Constructor and Description WilcoxonSignedRankPValue()Constructor.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static doublegetCriticalValue(double alpha, int n)Returns the critical value corresponding to the given significance and sample size.static doublegetPValue(double s, int n)Returns the p-value corresponding to the given rank sum and sample size.
-
-
-
Field Detail
-
MAX_N
public static final int MAX_N
The maximum sample size calculated using exact method. Normal approximation is used for sample size greater than this number.- See Also:
- Constant Field Values
-
calculated
public static boolean[] calculated
One-dimensional array of boolean values indicating whether the p-values for each sample size are calculated.
-
MAX_SUM
public static final int MAX_SUM
The maximum rank sum given the maximum sample size.- See Also:
- Constant Field Values
-
sum
public static int[][] sum
Two-dimensional array of integers representing the number of occurrences of each rank sum corresponding to the sample size. sum[i][j] = number of occurrences of rank sum j for sample size i.
-
pvalue
public static double[][] pvalue
Two-dimensional array of double values representing the cumulative p-values of each rank sum corresponding to the sample size. pvalue[i][j] = cumulative p-value of rank sum j for sample size i.
-
-
Method Detail
-
getPValue
public static double getPValue(double s, int n)Returns the p-value corresponding to the given rank sum and sample size. The exact method is used for sample size <= MAX_N, where as normal approximation is used for sample size > MAX_N.- Parameters:
s- rank sumn- sample size- Returns:
- p-value
-
getCriticalValue
public static double getCriticalValue(double alpha, int n)Returns the critical value corresponding to the given significance and sample size.- Parameters:
alpha- significancen- sample size- Returns:
- critical value
-
-
DMelt 3.0 © DataMelt by jWork.ORG