Skip to content

kruskal.test followed by kruskalmc

6 messages · Humber Andrade, Jose Iparraguirre, Peter Dalgaard

#
Humber,
Have a look at this: http://r.789695.n4.nabble.com/Multiple-Comparisons-Kruskal-Wallis-Test-kruskal-agricolae-and-kruskalmc-pgirmess-don-t-yield-the-sa-td4639004.html
Hope it helps.
Kind regards,

Jos?

Prof. Jos? Iparraguirre
Chief Economist
Age UK



-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Humber Andrade
Sent: 05 July 2013 11:38
To: r-help at r-project.org
Subject: [R] kruskal.test followed by kruskalmc

Hi all,

After running kruskal.test I have got results (p<0,005) pointing to reject the hypothesis that the samples were draw from the same population.
Howerver when I run the kruskalmc there are no significant differences in any of the multiple comparisons. Is that possible? Some clarification?

Thanks, Humber


<https://sites.google.com/site/humberandrade>


______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

The Wireless from Age UK | Radio for grown-ups.

www.ageuk.org.uk/thewireless


If you?re looking for a radio station that offers real variety, tune in to The Wireless from Age UK. 
Whether you choose to listen through the website at www.ageuk.org.uk/thewireless, on digital radio (currently available in London and Yorkshire) or through our TuneIn Radio app, you can look forward to an inspiring mix of music, conversation and useful information 24 hours a day.



 
-------------------------------
Age UK is a registered charity and company limited by guarantee, (registered charity number 1128267, registered company number 6825798). 
Registered office: Tavis House, 1-6 Tavistock Square, London WC1H 9NA.

For the purposes of promoting Age UK Insurance, Age UK is an Appointed Representative of Age UK Enterprises Limited, Age UK is an Introducer 
Appointed Representative of JLT Benefit Solutions Limited and Simplyhealth Access for the purposes of introducing potential annuity and health 
cash plans customers respectively.  Age UK Enterprises Limited, JLT Benefit Solutions Limited and Simplyhealth Access are all authorised and 
regulated by the Financial Services Authority. 
------------------------------

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are 
addressed. If you receive a message in error, please advise the sender and delete immediately.

Except where this email is sent in the usual course of our business, any opinions expressed in this email are those of the author and do not 
necessarily reflect the opinions of Age UK or its subsidiaries and associated companies. Age UK monitors all e-mail transmissions passing 
through its network and may block or modify mails which are deemed to be unsuitable.

Age Concern England (charity number 261794) and Help the Aged (charity number 272786) and their trading and other associated companies merged 
on 1st April 2009.  Together they have formed the Age UK Group, dedicated to improving the lives of people in later life.  The three national 
Age Concerns in Scotland, Northern Ireland and Wales have also merged with Help the Aged in these nations to form three registered charities: 
Age Scotland, Age NI, Age Cymru.
#
On Jul 5, 2013, at 15:00 , Humber Andrade wrote:

            
This can happen. It is a matter of probability theory, not of R. The following is a simplified paraphrase of what is going on:

# 15 random normals, compare range test to variance test
# Simulate everything for simplicity


# Null distribution
M0 <- replicate(10000, rnorm(15))
vv <- apply(M0,2,var)
rg <- apply(M0,2,range)
rr <- apply(rg,2,diff)
r.95  <- quantile(rr, .95)
v.95  <- quantile(vv, .95)
v.995 <- quantile(vv, .995)

# Distribution at quadrupled variance
M <- replicate(10000, rnorm(15,sd=2))
vv <- apply(M,2,var)
rg <- apply(M,2,range)
rr <- apply(rg,2,diff)
plot(rr,vv)
abline(h=c(v.95,v.995),v=r.95, col="red")

Notice that the two statistics are correlated, but not equivalent. There are cases where one value is beyond the .95 level and the other is not. Since it is theoretically optimal to use the variance as the test statistic in this model, there are quite a few more cases where  rr is below the cutoff and vv is above than the other way around. There are even a sizable number of cases where vv is beyond v.995 and rr does not reach r.95.

(The theoretical optimality applies only because I use an increased variance alternative. For specific alternatives, the picture can change. Try it, for instance with a single mean substantially different from the others:

M <- replicate(10000, rnorm(15,mean=rep(c(4,0),c(1,14))))

)

  
    
#
On Jul 5, 2013, at 16:34 , Humber Andrade wrote:

            
I'm afraid it can't be done. You really can be in a situation where you reject the global null hypothesis that all groups are the same, yet cannot point out any two groups that differ from eachother. 

-pd