|
template<domain D :shared3p > |
D float32 | wilcoxonRankSum (D int32[[1]] sample1, D bool[[1]] ia1, D int32[[1]] sample2, D bool[[1]] ia2, bool correctRanks, int64 alternative) |
|
template<domain D :shared3p > |
D float64 | wilcoxonRankSum (D int64[[1]] sample1, D bool[[1]] ia1, D int64[[1]] sample2, D bool[[1]] ia2, bool correctRanks, int64 alternative) |
|
template<domain D :shared3p > |
D float32 | wilcoxonRankSum (D float32[[1]] sample1, D bool[[1]] ia1, D float32[[1]] sample2, D bool[[1]] ia2, bool correctRanks, int64 alternative) |
|
template<domain D :shared3p > |
D float64 | wilcoxonRankSum (D float64[[1]] sample1, D bool[[1]] ia1, D float64[[1]] sample2, D bool[[1]] ia2, bool correctRanks, int64 alternative) |
|
Perform Wilcoxon rank sum tests.
- Note
- D - shared3p protection domain
-
Supported types - int32 / int64
-
The t-test requires the populations to be normally distributed. If the populations cannot be assumed to be normally distributed but are ordinal then the Mann-Whitney U or Wilcoxon rank-sum test can be used instead.
- Parameters
-
sample1 | - first sample |
ia1 | - vector indicating which elements of the first sample are available |
sample2 | - second sample |
ia2 | - vector indicating which elements of the second sample are available |
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 its values are only correct when both samples have at least 5 elements.
- Leakage
- Leaks the sum of the number of true values in ia1 and ia2
◆ wilcoxonRankSum() [1/4]
D float32 wilcoxonRankSum |
( |
D float32[[1]] |
sample1, |
|
|
D bool[[1]] |
ia1, |
|
|
D float32[[1]] |
sample2, |
|
|
D bool[[1]] |
ia2, |
|
|
bool |
correctRanks, |
|
|
int64 |
alternative |
|
) |
| |
◆ wilcoxonRankSum() [2/4]
D float64 wilcoxonRankSum |
( |
D float64[[1]] |
sample1, |
|
|
D bool[[1]] |
ia1, |
|
|
D float64[[1]] |
sample2, |
|
|
D bool[[1]] |
ia2, |
|
|
bool |
correctRanks, |
|
|
int64 |
alternative |
|
) |
| |
◆ wilcoxonRankSum() [3/4]
D float32 wilcoxonRankSum |
( |
D int32[[1]] |
sample1, |
|
|
D bool[[1]] |
ia1, |
|
|
D int32[[1]] |
sample2, |
|
|
D bool[[1]] |
ia2, |
|
|
bool |
correctRanks, |
|
|
int64 |
alternative |
|
) |
| |
◆ wilcoxonRankSum() [4/4]
D float64 wilcoxonRankSum |
( |
D int64[[1]] |
sample1, |
|
|
D bool[[1]] |
ia1, |
|
|
D int64[[1]] |
sample2, |
|
|
D bool[[1]] |
ia2, |
|
|
bool |
correctRanks, |
|
|
int64 |
alternative |
|
) |
| |