|
| template<domain D :shared3p > |
| D float32 | wilcoxonSignedRank (D int32 sample1, D int32 sample2, D bool filter, bool correctRanks, int64 alternative) |
| |
| template<domain D :shared3p > |
| D float64 | wilcoxonSignedRank (D int64 sample1, D int64 sample2, D bool filter, bool correctRanks, int64 alternative) |
| |
| template<domain D :shared3p > |
| D float32 | wilcoxonSignedRank (D float32 sample1, D float32 sample2, D bool filter, bool correctRanks, int64 alternative) |
| |
| template<domain D :shared3p > |
| D float64 | wilcoxonSignedRank (D float64 sample1, D float64 sample2, D bool filter, bool correctRanks, int64 alternative) |
| |
Perform Wilcoxon signed rank tests.
- Note
- The paired t-test requires the populations to be normally distributed. If the populations cannot be assumed to be normally distributed but are ordinal then the Wilcoxon signed rank test can be used instead.
-
D - shared3p protection domain
-
Supported types - int32 / int64 / float32 / float64
- Parameters
-
| sample1 | - first sample |
| sample2 | - second sample |
| filter | - vector indicating which elements of the sample to include in computing the statistic |
| correctRanks | - indicates if the equal sample values should be ranked correctly. If they are not the test is more conservative but faster. |
| alternative | - the type of alternative hypothesis. Less - mean of sample1 is less than mean of sample2, greater - mean of sample1 is greater than mean of sample2, two-sided - means of sample1 and sample2 are different |
- Returns
- returns a vector where the first element is the test statistic and the second element is the z-score. The z-score is continuity corrected. The z-score is an approximation and when there's less than 10 pairs with non-zero difference, it's incorrect.
- Leakage
- Leaks the number of true values in filter minus the number of pairs where the difference is zero
◆ wilcoxonSignedRank() [1/4]
template<domain D :shared3p >
| D float32 wilcoxonSignedRank |
( |
D float32 |
sample1, |
|
|
D float32 |
sample2, |
|
|
D bool |
filter, |
|
|
bool |
correctRanks, |
|
|
int64 |
alternative |
|
) |
| |
◆ wilcoxonSignedRank() [2/4]
template<domain D :shared3p >
| D float64 wilcoxonSignedRank |
( |
D float64 |
sample1, |
|
|
D float64 |
sample2, |
|
|
D bool |
filter, |
|
|
bool |
correctRanks, |
|
|
int64 |
alternative |
|
) |
| |
◆ wilcoxonSignedRank() [3/4]
template<domain D :shared3p >
| D float32 wilcoxonSignedRank |
( |
D int32 |
sample1, |
|
|
D int32 |
sample2, |
|
|
D bool |
filter, |
|
|
bool |
correctRanks, |
|
|
int64 |
alternative |
|
) |
| |
◆ wilcoxonSignedRank() [4/4]
template<domain D :shared3p >
| D float64 wilcoxonSignedRank |
( |
D int64 |
sample1, |
|
|
D int64 |
sample2, |
|
|
D bool |
filter, |
|
|
bool |
correctRanks, |
|
|
int64 |
alternative |
|
) |
| |