Quick question about the usage of glht.  I'm working with a data set   
from an experiment where the response is bounded at 0 whose variance  
increases with the mean, and is continuous.  A Gamma error  
distribution with a log link seemed like the logical choice, and so  
I've modeled it as such.

However, when I use glht to look for differences between groups, I get  
significant differences where there are none.  Now, I'm all for  
eyeballing means +/- 95% CIs.  However, I've had reviewers and  
committee members all tell me that I needed them.  Oy.  Here's the  
code and some of the sample data that, when visualized, is clearly not  
different in the comparisons I'm making, and, yet, glht (at least, how  
I'm using it, which might be improper) says that the differences are  
there.

Hrm.

I'm guessing I'm just using glht improperly, but, any help would be  
appreciated!

trt<-c("d", "b", "c", "a", "a", "d", "b", "c", "c", "d", "b", "a")
trt<-as.factor(trt)

resp<-c(0.432368576, 0.265148862, 0.140761439, 0.218506998,  
0.105017007,  0.140137615, 0.205552589, 0.081970097, 0.24352179,  
0.158875904, 0.150195422, 0.187526698)

#take a gander at the lack of differences
boxplot(resp ~ trt)

#model it
a.glm<-glm(resp ~ trt, family=Gamma(link="log"))

summary(a.glm)

#set up the contrast matrix
contra<-rbind("A v. B" = c(-1,1,0,0),
                        "A v. C" = c(-1,0,1,0),
                        "A v. D" = c(-1,0,0,1))
library(multcomp)                       
summary(glht(a.glm, linfct=contra))
  ---
Yields:

Linear Hypotheses:
             Estimate Std. Error z value p value
A v. B == 0   1.9646     0.6201   3.168 0.00314 **
A v. C == 0   1.6782     0.6201   2.706 0.01545 *
A v. D == 0   2.1284     0.6201   3.433 0.00137 **
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Adjusted p values reported)


-Jarrett




----------------------------------------
Jarrett Byrnes
Population Biology Graduate Group, UC Davis
Bodega Marine Lab
707-875-1969
http://www-eve.ucdavis.edu/stachowicz/byrnes.shtml


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
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.

Reply via email to