[R] Wilcoxon test and grouping factor with multiple levels
David Winsemius
dwinsemius at comcast.net
Tue Aug 17 14:16:31 CEST 2010
On Aug 17, 2010, at 2:48 AM, Iurie Malai wrote:
> Dear R users,
>
> I have a dataset with two variables: $esan - a grouping factor with 8
> levels and $reus. I'd like to do wilcox.test on this dataset as
> sugested Weiwei here:
> https://stat.ethz.ch/pipermail/r-help/2007-July/136627.html. I tried
> to adapt his recommendation but no succes. Can anyone help me?
That posting was showing how to perform a test where there were two
factors and one numeric variable. You only have one so your example
should simply be drawn from the help page for the function at the core
of that recommendation:
From earlier posting:
> mytry <- by(myDat, INDICES=as.factor(myDat[,3]), FUN=function(x)
{ + pairwise.wilcox.test(as.numeric(as.character(x$Scores)), + + x
$tissue, + + p.adjust.method = "none")$p.value + })
... namely:
?pairwise.wilcox.test
--
David Winsemius, MD
West Hartford, CT
More information about the R-help
mailing list