[R] simtest for Dunnett's test

Torsten Hothorn Torsten.Hothorn at rzmail.uni-erlangen.de
Fri Aug 13 14:18:42 CEST 2004


On Fri, 13 Aug 2004, Liaw, Andy wrote:

> Before you do any of that, you should realize the fact that simtest does
> _not_ do Dunnett's test:  It can use `Dunnett' _contrasts_ to do comparisons
> with a control, but the actual procedure is different.  You are unlikely to
> get the same result as other packages that perform standard Dunnett's test
> (or Tukey's, for that matter).
>

exactly. btw, you don't need to specify the contrast matrix
yourself for this type of question:

R> summary(simtest(y ~ h))

         Simultaneous tests: Dunnett contrasts

Call:
simtest.formula(formula = y ~ h)

         Dunnett contrasts for factor h

<...>

Absolute Error Tolerance:  0.001

Coefficients:
       Estimate t value Std.Err. p raw p Bonf p adj
h11-h1   12.022  -5.272     2.28 0.000  0.000 0.000
h7-h1    11.556  -5.067     2.28 0.000  0.000 0.000
h8-h1    10.952  -4.803     2.28 0.000  0.000 0.000
h2-h1    10.414  -4.567     2.28 0.000  0.000 0.000
h10-h1   10.247  -4.493     2.28 0.000  0.000 0.000
h9-h1     9.494  -4.163     2.28 0.000  0.000 0.000
h3-h1     7.397  -3.244     2.28 0.002  0.006 0.006
h4-h1     5.384  -2.361     2.28 0.020  0.061 0.053
h5-h1     5.085  -2.230     2.28 0.028  0.061 0.053
h6-h1     3.180  -1.394     2.28 0.166  0.166 0.166

does exactly the same because the `type' argument defaults to `Dunnett'.

Best,

Torsten

> Andy
>
> > From: Laurent Houdusse
> >
> > Hi!
> >
> > I use simtest fonction of multcomp package to compile a
> > Dunnett's test.
> > I have 10 treatments and one control group, so i create a matrix with:
> >
> > m<-matrix(0,10,11)
> > m[1,1]<--1
> > m[1,2]<-1
> > m[2,1]<--1
> > m[2,3]<-1
> > m[3,1]<--1
> > m[3,4]<-1
> > m[4,1]<--1
> > m[4,5]<-1
> > m[5,1]<--1
> > m[5,6]<-1
> > m[6,1]<--1
> > m[6,7]<-1
> > m[7,1]<--1
> > m[7,8]<-1
> > m[8,1]<--1
> > m[8,9]<-1
> > m[9,1]<--1
> > m[9,10]<-1
> > m[10,1]<--1
> > m[10,11]<-1
> > rownames(m)<-c("vehicle+vehicle vs. morphne
> > 60mg/kg+vehicle","vehicle+vehicle vs. Naloxone
> > 30mg/kg+vehicle","vehicle+vehicle vs. Naloxone 30mg/kg+Morphine
> > 60mg/kg","vehicle+vehicle vs. RWJ-69528-000-B
> > 0.1mg/kg+vehicle","vehicle+vehicle vs. RWJ-69528-000-B
> > 1mg/kg+vehicle","vehicle+vehicle vs. RWJ-69528-000-B 0.1mg/kg+morphine
> > 60mg/kg","vehicle+vehicle vs. RWJ-69528-000-B 1mg/kg+morphine
> > 60mg/kg","vehicle+vehicle vs. vehicle+acetaminophen
> > 600mg/kg","vehicle+vehicle vs. RWJ-69528-000-B 0.1mg/kg+acetaminophen
> > 600mg/kg","vehicle+vehicle vs. RWJ-69528-000-B 1mg/kg+acetaminophen
> > 600mg/kg")
> > y<-c(21.5,14.7,16.7,18.8,17.3,15.527,17.551,17.199,15.895,14.3
> > 88,30,30,30,21
> > .2,14.6,30.83,30.622,30.465,24.563,31.416,30,30,30,30,19.6,17.
> > 61,30.346,20.8
> > ,17.045,18.129,17.9,15.4,30,15.9,22.9,31.909,25.633,24.6,20.35
> > 5,18.807,30,18
> > .9,16.4,18.2,22.3,21.3,28.571,17.357,16.983,30.40,26.3,24.4,25
> > ,24.1,14.4,10.
> > 256,13.266,29.6,15.344,18.69,30,30,25.7,30,28.5,30,30.32,30,19
> > .879,30.716,25
> > .2,30,30,30,30,30,14.063,28.811,30.396,30.609,30,14.1,30,30,30
> > ,26.322,30.386
> > ,28.583,15.77,29.341,30,17.1,30,30,30,30,20.451,30,23.967,30.5
> > 07,30,30,30,27
> > .7,30,28.5,22.568,32.379,30.374,28.263)
> > h<-factor(c(rep(1:11, each = 10)))
> > result<-summary(simtest(y ~ h,cmatrix=cbind(0,m)))
> > rownames(result$estimate)
> > result
> >
> >
> > I want to compare my results with the results obtained with SigmaStat
> > Software.
> > In my results, i retrieve a correct q' value with the simtest t value
> > How can i say if P<0.05 like the SigmStat results?
> > Can i use p raw value, p bonf value, p adj value or other to compare
> > directly? Or can i use the Dunnett's tables?
> >
> > Thanks for your help!
> >
> >
> >
> >
> > Laurent Houdusse
> > Analyste Programmeur
> >
> > ______________________________________________
> > R-help at stat.math.ethz.ch mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide!
> > http://www.R-project.org/posting-guide.html
> >
> >
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>
>




More information about the R-help mailing list