[R] contrasts in a type III anova
David Jutier
David.Jutier at pge.cnrs-gif.fr
Fri May 7 13:20:14 CEST 2004
Hello,
I use a type III anova ("car" package) to analyse an unbalanced data design. I
have two factors and I would have the effect of the interaction. I read that
the result could be strongly influenced by the contrasts. I am really not an
expert and I am not sure to understand indeed about what it is...
Consequently, I failed to properly used the fit.contrast function (gregmisc
package) because I don't understand what the fonction need in the argument
"coeff".
The two factors are Y (Ya, Yb,..., Ye) and Auto (Auto1, Auto2,...., Auto10)
The responses are binomial (counts in the matrice "mat") and gaussian
(variable "tot"). I use the glm procedure :
glm1 <- glm (mat ~ y*auto, data, family=binomial)
glm2 <- glm (tot ~ y*auto, data, family=gaussian)
Subsequently I use the Type III anova :
Anova (glm1, type="III")
Anova (glm2, type="III")
Using the contrast.treatment for both factors Y and Auto, R gives coherent
results, but I really not sure that this contrasts are appropriate !
Thank's for your advices !
David
More information about the R-help
mailing list