Computes the two-sample Wilcoxon signed-rank test for each feature.
See the Details section below for further information.
Usage
rowPairedWilcoxonT(
x,
g,
alternative = c("two.sided", "greater", "less"),
null = 0,
exact = NA,
correct = TRUE
)
Arguments
- x
matrix
ordata.frame
.- g
a vector or factor object giving the group for the corresponding elements of
x
.- alternative
character string or vector of length
nrow(x)
. The alternative hypothesis for each row ofx
. Values must be one of"two.sided"
(default),"greater"
or"less"
.- null
numerical value or numeric vector of length
nrow(x)
. The true values of the difference in means between the two groups of observations for each row.- exact
logical or NA (default) indicator whether an exact p-value should be computed (see Details). A single value or a logical vector with values for each observation.
- correct
logical indicator whether continuity correction should be applied in the cases where p-values are obtained using normal approximation. A single value or logical vector with values for each observation.
Value
A list containing two elements:
- statistic
A numeric vector, the values of the test statistic
- significance
A numeric vector, the p-values of the selected test
Details
It is a wrapper to row_wilcoxon_paired
function.
Examples
#Seed
set.seed(1010)
#Data
x = matrix(rnorm(100 * 20), 100, 20)
g = c(rep(0,10),rep(1,10))
#Compute
rowPairedWilcoxonT(x = x, g = g)
#> $statistic
#> [1] 30 18 36 16 52 38 37 19 22 35 22 8 19 12 37 24 28 12 30 30 23 51 9 16 27
#> [26] 33 31 20 18 12 20 52 43 30 12 40 21 17 14 20 27 29 17 33 29 22 44 36 39 52
#> [51] 48 40 13 40 33 7 28 26 42 14 35 6 33 30 26 15 21 7 18 28 27 8 24 18 21
#> [76] 8 29 44 22 36 21 18 28 23 32 19 35 30 32 16 38 44 20 35 46 37 19 15 37 11
#>
#> $significance
#> [1] 0.845703125 0.375000000 0.431640625 0.275390625 0.009765625 0.322265625
#> [7] 0.375000000 0.431640625 0.625000000 0.492187500 0.625000000 0.048828125
#> [13] 0.431640625 0.130859375 0.375000000 0.769531250 1.000000000 0.130859375
#> [19] 0.845703125 0.845703125 0.695312500 0.013671875 0.064453125 0.275390625
#> [25] 1.000000000 0.625000000 0.769531250 0.492187500 0.375000000 0.130859375
#> [31] 0.492187500 0.009765625 0.130859375 0.845703125 0.130859375 0.232421875
#> [37] 0.556640625 0.322265625 0.193359375 0.492187500 1.000000000 0.921875000
#> [43] 0.322265625 0.625000000 0.921875000 0.625000000 0.105468750 0.431640625
#> [49] 0.275390625 0.009765625 0.037109375 0.232421875 0.160156250 0.232421875
#> [55] 0.625000000 0.037109375 1.000000000 0.921875000 0.160156250 0.193359375
#> [61] 0.492187500 0.027343750 0.625000000 0.845703125 0.921875000 0.232421875
#> [67] 0.556640625 0.037109375 0.375000000 1.000000000 1.000000000 0.048828125
#> [73] 0.769531250 0.375000000 0.556640625 0.048828125 0.921875000 0.105468750
#> [79] 0.625000000 0.431640625 0.556640625 0.375000000 1.000000000 0.695312500
#> [85] 0.695312500 0.431640625 0.492187500 0.845703125 0.695312500 0.275390625
#> [91] 0.322265625 0.105468750 0.492187500 0.492187500 0.064453125 0.375000000
#> [97] 0.431640625 0.232421875 0.375000000 0.105468750
#>