| Modifier and Type | Field and Description |
|---|---|
| private NaturalRanking | naturalRanking
Ranking algorithm. |
| Access | Constructor and Description |
|---|---|
| public | WilcoxonSignedRankTest()
Create a test instance where NaN's are left in place and ties get the average of applicable ranks. |
| public | WilcoxonSignedRankTest(final NaNStrategy
specifies the strategy that should be used for Double.NaN's nanStrategy, final TiesStrategy specifies the strategy that should be used for ties tiesStrategy)Create a test instance using the given strategies for NaN's and ties. |
| Modifier and Type | Method and Description |
|---|---|
| private double[] | |
| private double | Returns: two-sided asymptotic p-valuesmallest Wilcoxon signed rank value Wmin, final int number of subjects (corresponding to x.length) N)
|
| private double[] | Returns: z = y - xfirst sample x, final double[] second sample y)Calculates y[i] - x[i] for all i |
| private double | Returns: two-sided exact p-valuelargest Wilcoxon signed rank value Wmax, final int number of subjects (corresponding to x.length) N)Algorithm inspired by http://www.fon.hum.uva.nl/Service/Statistics/Signed_Rank_Algorihms.html#C by Rob van Son, Institute of Phonetic Sciences & IFOTT, University of Amsterdam |
| private void | ensureDataConformance(final double[]
first sample x, final double[] second sample y)Ensures that the provided arrays fulfills the assumptions. |
| public double | Returns: wilcoxonSignedRank statistic (the larger of W+ and W-)the first sample x, final double[] the second sample y)Computes the Wilcoxon signed ranked statistic comparing mean for two related samples or repeated measurements on a single sample. |
| public double | Returns: p-valuethe first sample x, final double[] the second sample y, final boolean if the exact p-value is wanted (only works for x.length <= 30,
if true and x.length > 30, this is ignored because
calculations may take too long) exactPValue)Returns the observed significance level, or p-value, associated with a Wilcoxon signed ranked statistic comparing mean for two related samples or repeated measurements on a single sample. |
| naturalRanking | back to summary |
|---|---|
| private NaturalRanking naturalRanking Ranking algorithm. | |
| WilcoxonSignedRankTest | back to summary |
|---|---|
| public WilcoxonSignedRankTest() Create a test instance where NaN's are left in place and ties get the average of applicable ranks. Use this unless you are very sure of what you are doing. | |
| WilcoxonSignedRankTest | back to summary |
|---|---|
| public WilcoxonSignedRankTest(final NaNStrategy nanStrategy, final TiesStrategy tiesStrategy) Create a test instance using the given strategies for NaN's and ties. Only use this if you are sure of what you are doing.
| |
| calculateAbsoluteDifferences | back to summary |
|---|---|
| private double[] calculateAbsoluteDifferences(final double[] z) throws NullArgumentException, NoDataException Calculates |z[i]| for all i
| |
| calculateAsymptoticPValue | back to summary |
|---|---|
private double calculateAsymptoticPValue(final double Wmin, final int N)
| |
| calculateDifferences | back to summary |
|---|---|
| private double[] calculateDifferences(final double[] x, final double[] y) Calculates y[i] - x[i] for all i
| |
| calculateExactPValue | back to summary |
|---|---|
| private double calculateExactPValue(final double Wmax, final int N) Algorithm inspired by http://www.fon.hum.uva.nl/Service/Statistics/Signed_Rank_Algorihms.html#C by Rob van Son, Institute of Phonetic Sciences & IFOTT, University of Amsterdam
| |
| ensureDataConformance | back to summary |
|---|---|
| private void ensureDataConformance(final double[] x, final double[] y) throws NullArgumentException, NoDataException, DimensionMismatchException Ensures that the provided arrays fulfills the assumptions.
| |
| wilcoxonSignedRank | back to summary |
|---|---|
| public double wilcoxonSignedRank(final double[] x, final double[] y) throws NullArgumentException, NoDataException, DimensionMismatchException Computes the Wilcoxon signed ranked statistic comparing mean for two related samples or repeated measurements on a single sample. This statistic can be used to perform a Wilcoxon signed ranked test evaluating the null hypothesis that the two related samples or repeated measurements on a single sample has equal mean. Let Xi denote the i'th individual of the first sample and Yi the related i'th individual in the second sample. Let Zi = Yi - Xi. Preconditions:
| |
| wilcoxonSignedRankTest | back to summary |
|---|---|
| public double wilcoxonSignedRankTest(final double[] x, final double[] y, final boolean exactPValue) throws NullArgumentException, NoDataException, DimensionMismatchException, NumberIsTooLargeException, ConvergenceException, MaxCountExceededException Returns the observed significance level, or p-value, associated with a Wilcoxon signed ranked statistic comparing mean for two related samples or repeated measurements on a single sample. Let Xi denote the i'th individual of the first sample and Yi the related i'th individual in the second sample. Let Zi = Yi - Xi. Preconditions:
| |