Dear David,
The short answer is that in a two-way ANOVA (or an analogous generalized
linear model), the test for the interaction doesn't depend upon the contrast
type, and is identical for "Type-II" and "Type-III" (and,
indeed, "Type-I"
-- i.e., sequential) tests. It's the main-effect tests that depend upon
contrast type (for "Type-III" tests), and for which
"Type-II" and "Type-III"
tests differ. There's a longer answer in the book with which the car package
is associated (and a longer one still in my Applied Regression text, as well
as other places).
I hope this helps,
John
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of David Jutier
> Sent: Friday, May 07, 2004 6:20 AM
> To: r-help at stat.math.ethz.ch
> Subject: [R] contrasts in a type III anova
>
> 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
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide!
> http://www.R-project.org/posting-guide.html