[R] help comparing two median with R

Robert McFadden robert-mcfadden at o2.pl
Tue Apr 17 13:38:56 CEST 2007


 

> -----Original Message-----
> From: r-help-bounces w stat.math.ethz.ch 
> [mailto:r-help-bounces w stat.math.ethz.ch] On Behalf Of Jim Lemon
> Sent: Tuesday, April 17, 2007 12:37 PM
> To: Pedro A Reche
> Cc: r-help w stat.math.ethz.ch
> Subject: Re: [R] help comparing two median with R
> 
> Pedro A Reche wrote:
> > Dear R users,
> > I am new to R and  I would like to ask your help with the following 
> > topic. I have three sets of numeral data, 2 sets are paired and a 
> > third is independent of the other two. For each of these sets I have
> > obtained their basic statistics (mean, median, stdv, range ...).    
> > Now I want to compare if these sets differ. I could compare 
> the mean 
> > doing a basic T test . However, I was looking for a test to compare
> > the medians using R.   If that is possible I would love to 
> hear the  
> > specifics.
> 
> Hi Pedro,
> You can use the Mann-Whitney test ("wilcox" with two 
> samples), but you would have to check that the second and 
> third moments of the variable distributions were the same, I think.
> 
> Jim
Use Mann-Whitney U test, but remember about 2 assumption:
1. samples come from continuous distribution (there are no tied
obserwations)
2. distributions are identical in shape. It's very similar to t-test but
Mann-Whitney U test is not as affected by violation of the homogeneity of
variance assumption as t-test is.

Rob



More information about the R-help mailing list