我使用coin :: wilcox_test进行分析,我想知道如何从中得到估计值(位置差异)。
library(coin)
water_transfer <- data.frame(pd = c(0.80, 0.83, 1.89, 1.04, 1.45, 1.38, 1.91, 1.64, 0.73, 1.46,1.15, 0.88, 0.90, 0.74, 1.21),
age = factor(c(rep("At term", 10), rep("12-26 Weeks", 5))))
wt <- wilcox_test(pd ~ age, data = water_transfer, distribution = "exact", conf.int = TRUE)
wt
Exact Wilcoxon Mann-Whitney Rank Sum Test
data: pd by age (12-26 Weeks, At term)
Z = -1.2, p-value = 0.3
alternative hypothesis: true mu is not equal to 0
95 percent confidence interval:
-0.76 0.15
sample estimates:
difference in location
-0.305
如何检索“-0.305”?
答案 0 :(得分:1)
刚想通了:
confint(wt)[[2]]
difference in location
-0.305