R中的多重比较(Nemenyi检验)的成对检验

时间:2015-07-17 05:22:18

标签: r kruskal-wallis

我正在使用包PMCMR来执行博士后Kruskal-Nemenyi测试。 当我使用默认设置运行测试时:

posthoc.kruskal.nemenyi.test(x=coastal$HIGH_MORTGAGE, g=coastal$SIZECLASS, method="Tukey")

我得到以下结果和警告:

Pairwise comparisons using Tukey and Kramer (Nemenyi) test  
                   with Tukey-Dist approximation for independent samples

data:  coastal$HIGH_MORTGAGE and coastal$SIZECLASS 

       Large Medium
Medium 0.931 -     
Small  0.746 0.078 

P value adjustment method: none

Warning message:
In posthoc.kruskal.nemenyi.test.default(x = coastal$HIGH_MORTGAGE,  :
  Ties are present, p-values are not corrected.*

当我运行测试时,将分布更改为Chisq以对关系应用校正,我仍然得到相同的结果,并且不使用卡方分布。

posthoc.kruskal.nemenyi.test(x=coastal$HIGH_MORTGAGE, g=coastal$SIZECLASS, method="Chisq")

Pairwise comparisons using Tukey and Kramer (Nemenyi) test  
                   with Tukey-Dist approximation for independent samples

data:  coastal$HIGH_MORTGAGE and coastal$SIZECLASS

       Large Medium
Medium 0.931 -     
Small  0.746 0.078

P value adjustment method: none 

Warning message:
In posthoc.kruskal.nemenyi.test.default(x = coastal$HIGH_MORTGAGE,  :
  Ties are present, p-values are not corrected.

我想知道包装中是否有错误,或者是否有任何方法我不知道要解决这个问题。

1 个答案:

答案 0 :(得分:1)

从版本PMCMR1.0PMCMR1.1(以及> 1.1)语法略有变化,因此它是dist,而不是method,它是:< / p>

posthoc.kruskal.nemenyi.test( x, g, dist = c("Tukey", "Chisquare"), ...)

posthoc.kruskal.nemenyi.test(formula, data, subset, na.action, dist =
 c("Tukey", "Chisquare"), ...)

包含示例的插图已在版本PMCMR1.3中相应更新。