在我的数据中,我有3个抑郁级别,观察到的频率如下:无(481),小(136)和大(128)。我想测试我的数据中3个级别的比例是否分别为= 0.5、0.3和0.2。
为了在R中做卡方检验,我做了
chisq.test(x = c(481, 136, 128),
p = c(0.5, 0.3, 0.2))
这给了我这个输出
Chi-squared test for given probabilities
data: c(481, 136, 128)
X-squared = 68.819, df = 2, p-value = 1.138e-15
我还想做一个精确的测试。我试过了
fisher.test(x = c(481, 136, 128),
y = c(0.5, 0.3, 0.2))
这就给了我这个
Fisher's Exact Test for Count Data
data: c(481, 136, 128) and c(0.5, 0.3, 0.2)
p-value = 1
alternative hypothesis: two.sided
这里我漏掉了什么?
转载请注明出处:http://www.shenzhenzsmy.com/article/20230514/2459602.html