[R] multiple comparison tests & simultaneous multiple plots
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Fri Aug 4 00:09:29 CEST 2000
Steve Arthur <sarthur at protogene.com> writes:
> I am not sure if my message made it through, so here it is again!
>
> Hi Rer's,
>
> R-1.1.0
>
> I have two questions for you:
>
> 1)
>
> I am trying to complete a multiple comparison test after completing a
> one-way ANOVA on some data. I think this is pretty reasonable.
>
> aov(MetricSubset ~ GeneNameFactor)
>
> works
>
> pairwise.t.test(MetricSubset,GeneNameSubset,p.adjuxt.method=bonferroni,p
> ool.sd=FALSE)
>
> returns,
>
> Error in meanplot.R(c(3258, 3780, 3968, 2577, 8831, 2501, 2586, 2679, :
> couldn't find function "pairwise.t.test"
??
That error mesg. look strange for that call.
Anyways, pairwise.t.test is in the ctest package, so you need
library(ctest) first. (and you'll also need to spell p.adjuxt.method
correctly...)
>
> I also looked at the R function
>
> p.adjust
>
> I am not sure how p.adjust with multiple comparisons.
Easy: just give it a vector of p values and it adjusts them by the
three different methods.
> Does R support multiple comparison tests (Tukey, Bonferroni, etc...) and
> are they easy to implement?
Bonferroni is in pairwise.t.test. The studentized range distribution
is there (ptukey & friends) and doing Tukey multiple comparisons is
relatively trivial with that in hand *provided* the groups have the
same size and the variances are equal. I believe Doug Bates recently
rolled up a function for Tukey comparisons with the popular
approximation for unequal group sizes?
In general the various procedures are easy to code, but many of them
are quite specific in scope, and it is difficult to write something
that works generally. (We do seem to be missing the many-one t
distributions, though)
> 2)
>
> I am also trying to plot some information either as boxplot, dotplots,
> or
> plots.
>
> What I want to do is produce multiple plots simultaneously on separate
> "R
> Graphics: Device 2 (ACTIVE)" for easier analysis. I am look at using
> "for" loops or the "by", am I on the right track?
Um, maybe... More likely, you want to look at X11() or windows() for
starting new windows, and dev.xxx for manipulating which one is
active, etc.
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list