[R] glht (multicomparisons) with an interaction factor

gaiarrido gaiarrido at usal.es
Thu Jan 12 10:21:15 CET 2012


Hi,
i was working with this model

> mq<-glm(rojos~edadysexo*zona*estacion,quasipoisson)

and i get this minimal adequate model

> anova(mq5,test="F")
              Df Deviance Resid. Df Resid. Dev        F    Pr(>F)    
NULL                            518      64799                       
edadysexo      2   1556.5       516      63243   8.9434 0.0001524 ***
zona           4  13590.6       512      49652  39.0448 < 2.2e-16 ***
estacion       1  10069.1       511      39583 115.7112 < 2.2e-16 ***
zona:estacion  4   2879.6       507      36704   8.2728 1.809e-06 ***

I know the correct syntaxis to make a post-hoc comparisonfor single factor

> summary(glht(mq5, linfct=mcp(edadysexo="Tukey")))
             Estimate Std. Error z value Pr(>|z|)   
M - H == 0    0.28976    0.09541   3.037   0.0060 **
SUB - H == 0 -0.22610    0.22626  -0.999   0.5609   
SUB - M == 0 -0.51586    0.21921  -2.353   0.0441 * 
 (Adjusted p values reported -- single-step method)

and with a single factor involved in an interaction

> summary(glht(mq5, linfct=mcp(estacion="Tukey", interaction_average=TRUE)))
                        Estimate Std. Error z value Pr(>|z|)    
verano - primavera == 0   -1.352      0.151  -8.952   <2e-16 ***
 (Adjusted p values reported -- single-step method)

But how can i test the interaction "zona:estacion", I've tried to do this
ways, but doesn't work
1. > summary(glht(mq5, linfct=mcp((estacion:zona)="Tukey",
interaction_average=TRUE)))
2.> s<-interaction(zona,estacion)
> mqs<-glm(rojos~edadysexo+zona+estacion+s,quasipoisson)
> summary(glht(mqs, linfct=mcp(s="Tukey")))
Error en modelparm.default(model, ...) : 
  dimensions of coefficients and covariance matrix don't match

Anyone can helps? 



-----
Mario Garrido Escudero
PhD student
Dpto. de Biología Animal, Ecología, Parasitología, Edafología y Qca. Agrícola
Universidad de Salamanca
--
View this message in context: http://r.789695.n4.nabble.com/glht-multicomparisons-with-an-interaction-factor-tp4288343p4288343.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list