我有这张桌子,我想对它进行统计分析。
table(sci$category, sci$true_group)
mono sim_rus_nen suc_balanced suc_nen_rus suc_rus_nen
generalization 9 3 9 4 3
description 35 16 15 13 17
scheme 2 1 1 1 2
syncretism 5 3 7 16 2
tautology 2 2 2 3 3
substitution 1 0 0 0 0
indefinite 7 5 5 6 9
no_answer 30 17 18 13 19所以我决定用费舍尔的精确测试。但是我有这个错误(虽然chiq.square没有问题)
fisher.test(table(sci$category, sci$true_group))fisher.test(my_tab)中的错误: fexact3中的错误,iti=6=0:负键-1099365618 (kyy=91)
我怎么才能解决这个问题?
发布于 2018-06-18 22:34:27
对于更大的应急表/计数,它得到资源密集型,计算出所有最坏的情况才能到达p值(似乎就是那个错误)。
因此,可以方便地模拟大于(2x2)的表的p值:
df <- table(sci$category, sci$true_group)
fisher.test(df, simulate.p.value = TRUE, B = 1e6)
Fisher's Exact Test for Count Data with simulated p-value (based on 1e+06 replicates)
data: df
p-value = 0.1054
alternative hypothesis: two.sidedPS:在Fishers精确测试与Chisq测试之间的选择是另一种讨论.为了清晰起见,我建议您查看这个经过交叉验证的帖子:Alternatives to chisq-test
https://stackoverflow.com/questions/50917013
复制相似问题