gpt4 book ai didi

r - 如何从 R 中的 coin::wilcox_test 中获取估计值

转载 作者:行者123 更新时间:2023-12-05 04:15:38 25 4
gpt4 key购买 nike

我使用 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”?

最佳答案

刚想通了:

confint(wt)[[2]]
difference in location
-0.305

关于r - 如何从 R 中的 coin::wilcox_test 中获取估计值,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31615497/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com