Java Mailing List Archive

http://www.r-help.com/

Home » Home (12/2007) » R Help for Statistical Computing »

Re: [R] help comparing two median with R

Robert Mcfadden

2007-04-17

Replies:



> -----Original Message-----
> From: r-help-bounces@(protected)
> [mailto:r-help-bounces@(protected)
> Sent: Tuesday, April 17, 2007 12:37 PM
> To: Pedro A Reche
> Cc: r-help@(protected)
> 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

______________________________________________
R-help@(protected)
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.
©2008 r-help.com - Jax Systems, LLC, U.S.A.