[R] Multiple Comparisons-Kruskal-Wallis-Test: kruskal{agricolae} and kruskalmc{pgirmess} don't yield the same results although they should do (?)

peter dalgaard pdalgd at gmail.com
Fri Aug 3 09:20:00 CEST 2012


On Aug 3, 2012, at 07:42 , greatest.possible.newbie wrote:

> I am doing multiple comparisons for data that is not normally distributed.
> For this purpose I tried both functions kruskal{agricolae} and
> kruskalmc{pgirmess}. It confuses me that these functions do not yield the
> same results although they are doing the same thing, don't they? Can anyone
> tell my why this happens and which function I can trust?
> 
> kruskalmc() tells me that there are no differences between any of the groups
> (i.e. the "difference" column of the results is filled only with FALSE).
> kruskal() tells me that there are indeed differences (between group 4 and
> 11).

Trust nothing if you don't understand the issues involved. There's a reason that special code is required for multiple comparisons, and a rather complicated and inexact theory for dealing with it. There are special complications with rank tests because the standard theory assumes a global null (no group differences at all).

One of the approaches is to perform the testing pairwise and adjust the p-values for multiple comparisons. Notice that the kruskal() function has a p.adj argument which defaults to "none"! 

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-help mailing list