简体   繁体   English

fisher.test 中的错误:fexact3 中的错误,it[i=6]=0:否定键 (kyy=91)

[英]Error in fisher.test : Bug in fexact3, it[i=6]=0: negative key (kyy=91)

I have this table abd I want to analyse it statistically.我有这张表,我想对其进行统计分析。

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

So I decided to apply Fisher's exact test.所以我决定应用Fisher精确检验。 But I have this error (although it's OK with chiq.square)但是我有这个错误(虽然 chiq.square 没问题)

fisher.test(table(sci$category, sci$true_group))

Error in fisher.test(my_tab) : Bug in fexact3, it[i=6]=0: negative key -1099365618 (kyy=91) fisher.test(my_tab) 中的错误:fexact3 中的错误,it[i=6]=0:否定键 -1099365618 (kyy=91)

How can I fix this?我怎样才能解决这个问题?

For larger contingency table/ counts, it gets resource intensive, to count all the worst cases to arrive at the p-value (seems to be that error).对于较大的列联表/计数,它会占用大量资源,以计算所有最坏的情况以得出 p 值(似乎是那个错误)。

So its convenient to simulate the p-values for tables larger than (2x2):因此可以方便地模拟大于 (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.sided

PS: Choosing between Fishers exact test vs Chisq-test is a whole another discussion. PS:在 Fishers 精确检验与 Chisq 检验之间进行选择完全是另一个讨论。 I would refer you to this cross validated post for clarity: Alternatives to chisq-test为了清楚起见,我建议您参考这篇经过交叉验证的帖子: chisq-test 的替代品

I have the problem that I get an error message if I try to use the fisher.test如果我尝试使用fisher.test,我会收到错误消息

fisher.test(carprices$insurance_symboling, carprices$weight) fisher.test(carprices$insurance_symboling, carprices$weight)

Error in fisher.test(carprices$insurance_symboling, carprices$weight) : FEXACT error 6 (f5xact). fisher.test 中的错误(carprices$insurance_symboling,carprices$weight):FEXACT 错误 6 (f5xact)。 LDKEY=427 is too small for this problem: kval=317844542. LDKEY=427 对于这个问题来说太小了:kval=317844542。 Try increasing the size of the workspace.尝试增加工作区的大小。

What can I do?我能做些什么?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM