Dear all,
since ![[image]](https://static.bebac.at/img/Rlogo_15_12.svg) 4.6.0 the function wilcox.test() can perform exact (conditional) inference in case of ties. Therefore, package coin* is no more needed for the comparison of tmax.
set.seed(123456)
T <- 0.5 * round(runif(n = 24, min = 1, max = 3) / 0.5)
R <- 0.5 * round(runif(n = 24, min = 1, max = 3) / 0.5)
data <- data.frame(subject = factor(c(1:24, 1:24)),
treatment = factor(c(rep("T", 24), rep("R", 24)), levels = c("T", "R")),
tmax = c(T, R))
by(data$tmax, data$treatment, summary)
data$treatment: T
Min. 1st Qu. Median Mean 3rd Qu. Max.
1.000 1.500 2.000 2.062 2.625 3.000
------------------------------------------------------------
data$treatment: R
Min. 1st Qu. Median Mean 3rd Qu. Max.
1.000 1.875 2.250 2.167 2.500 3.000
- 4.5.3 (2026-03-11)
wilcox.test(Pair(T, R) ~ 1, data = data, conf.int = TRUE, conf.level = 0.9, exact = TRUE)
Wilcoxon signed rank test with continuity correction
data: Pair(T, R)
V = 79.5, p-value = 0.5403
alternative hypothesis: true location shift is not equal to 0
90 percent confidence interval:
-0.5000132 0.2500161
sample estimates:
(pseudo)median
-0.2499737
Warning messages:
1: In wilcox.test.default(x = respVar[, 1L], y = respVar[, 2L], paired = TRUE, :
cannot compute exact p-value with ties
2: In wilcox.test.default(x = respVar[, 1L], y = respVar[, 2L], paired = TRUE, :
cannot compute exact confidence interval with ties
3: In wilcox.test.default(x = respVar[, 1L], y = respVar[, 2L], paired = TRUE, :
cannot compute exact p-value with zeroes
4: In wilcox.test.default(x = respVar[, 1L], y = respVar[, 2L], paired = TRUE, :
cannot compute exact confidence interval with zeroes
wilcox.test(Pair(T, R) ~ 1, data = data, conf.int = TRUE, conf.level = 0.9, exact = FALSE)
Wilcoxon signed rank test with continuity correction
data: Pair(T, R)
V = 79.5, p-value = 0.5403
alternative hypothesis: true location shift is not equal to 0
90 percent confidence interval:
-0.5000132 0.2500161
sample estimates:
(pseudo)median
-0.2499737
- 4.6.0 (2026-04-24)
wilcox.test(Pair(T, R) ~ 1, data = data, conf.int = TRUE, conf.level = 0.9, exact = TRUE)
Wilcoxon signed rank exact test
data: Pair(T, R)
V = 124.5, p-value = 0.6332
alternative hypothesis: true location shift is not equal to 0
91.2 percent confidence interval:
-0.50 0.25
sample estimates:
(pseudo)median
0
- Hothorn T, Winell H, Hornik K, van de Wiel MA, Zeileis A. coin: Conditional Inference Procedures in a Permutation Test Framework. Package version 1.4-3. 2023-09-26. CRAN.
—
Dif-tor heh smusma 🖖🏼 Довге життя Україна! ![[image]](https://static.bebac.at/pics/Blue_and_yellow_ribbon_UA.png)
Helmut Schütz
The quality of responses received is directly proportional to the quality of the question asked. 🚮
Science Quotes |