[R] problems with glht for ancova

gaiarrido gaiarrido at usal.es
Thu Jan 12 09:29:43 CET 2012


I answer myself, perhaps it can be useful to anyone.

The problem is that I tried to run a psot hoc test before i get the minimal
model by deleting the interaction, 

if I do it:

> ancova2<-aov(log(peso)~edadysexo+log(lcc))
> anova(ancova,ancova2)
  Res.Df    RSS Df Sum of Sq      F Pr(>F)
1    509 10.085                           
2    511 10.148 -2 -0.063484 1.6021 0.2025

It's correct, there is no differences between models. And now i can run a
post hoc test

> summary(glht(ancova2, linfct=mcp(edadysexo="Tukey")))
             Estimate Std. Error t value Pr(>|t|)    
M - H == 0    0.15120    0.01761   8.588   <1e-05 ***
SUB - H == 0 -0.01584    0.02659  -0.596    0.812    
SUB - M == 0 -0.16704    0.03248  -5.144   <1e-05 ***
 (Adjusted p values reported -- single-step method)

>Two question: 
>1) Why I don't get differences in edadysexo when i got it in the ancova 
Wthi the minimal model i get it
>2) About the warning message. Why R said "covariate interactions found" of
i didn't get it in the ancova 
Because in the first model "edadysexo" was in an interaction.

I hope this will be useful Mario




-----
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/problems-with-glht-for-ancova-tp4284908p4288226.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list