大佬教程收集整理的这篇文章主要介绍了如何从 R 中的 wilcoxsign 测试中提取价值,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
我怎样才能拉动 z ?
渐近 Wilcoxon-Pratt 有符号秩检验
data: y by x (pos,neg)
stratifIEd by block
Z = 2.5113,p-value = 0.01203
alternative hypothesis: true mu is not equal to 0
wilcoxsign_test()
函数来自 coin
包(这是人们回答的有用信息)。
大多数 R 函数按照@ChrisRuehlemAnn 建议的方式工作,但 wilcoxsign_test()
是一个例外;它存储为 S4 类,这使事情变得更加模糊。您必须使用 str()
和 slotNames()
的某种组合进行挖掘,并通过 @
library(coin)
w <- wilcoxsign_test(mpg~vs,data=mtcars)
slotNames(w)
## [1] "parameter" "nullvalue" "diStribution" "statistic"
## "estimates"
## [6] "method" "call"
w@statistic@teststatistic
## [1] 4.937168
,
通常的方法是将测试存储为对象并从中提取感兴趣的值。例如,使用 wilcox.test
:
test <- wilcox.test(rnorm(100),dnorm(1000))
test
Wilcoxon rank sum test with conTinuity correction
data: rnorm(100) and dnorm(1000)
W = 54,p-value = 0.9044
alternative hypothesis: true LOCATIOn shift is not equal to 0
只需输入您的测试对象的名称,添加 $
并将光标移到它上面以查看您可以提取的内容的选项,例如:
test$statistic
W
54
以上是大佬教程为你收集整理的如何从 R 中的 wilcoxsign 测试中提取价值全部内容,希望文章能够帮你解决如何从 R 中的 wilcoxsign 测试中提取价值所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。