【问题标题】:Pairwise Fisher's Exact test成对 Fisher 精确检验
【发布时间】:2021-11-11 02:45:39
【问题描述】:

我将 3 种治疗方法与成功/失败响应变量进行比较,为 Fisher 精确检验创建 n x 2。现在我想使用 pairwise.fisher.test(fmsb 包)进行事后比较。

success <- c(0, 0, 8)
failure <- c(80, 80, 8)
df <- data.frame(success, failure)
row.names(df) <- ("autogamy", "gietonogamy", "outcross")

给予: 成功失败 自婚 0 80 gietonogamy 0 80 跨界 8 72

test.1

pw.test <- pairwise.fisher.test(breedsystem.df, n = 2, p.adjust.method = "bonferroni")

我尝试了多个 n 值,但都出现相同的错误。任何帮助都可以整理 n 或尝试不同的方法。谢谢!

【问题讨论】:

    标签: r comparison posthoc


    【解决方案1】:
     success <- c(0, 0, 8)
     failure <- c(80, 80, 8)
     total <- success + failure
     names(total) <- c("autogamy", "gietonogamy", "outcross")
     pairwise.fisher.test(success, total,p.adjust.method = "bonferroni")
    
        Pairwise comparisons using Pairwise comparison of proportions (Fisher) 
    
    data:  success out of total 
    
      1       2      
    2 1       -      
    3 2.9e-07 2.9e-07
    
    P value adjustment method: bonferroni
    

    参数n= 应该是伯努利试验总数的向量,而不是进行的 3 次试验。希望对你有帮助

    【讨论】:

    • 您的答案可以通过额外的支持信息得到改进。请edit 添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。你可以找到更多关于如何写好答案的信息in the help center
    • 正如目前所写,您的答案尚不清楚。请edit 添加其他详细信息,以帮助其他人了解这如何解决所提出的问题。你可以找到更多关于如何写好答案的信息in the help center
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-04-29
    • 1970-01-01
    • 2017-07-29
    • 1970-01-01
    • 1970-01-01
    • 2014-01-26
    相关资源
    最近更新 更多