Skip to content
Prev 161503 / 398502 Next

question about contrast in R for multi-factor linear regression models?

Hi losemind,
Yes, it is possible to lose your mind on this (so perhaps get a real name).
A good friend here is

?dummy.coef

In your case (i.e. treatment contrasts), your reference level for the
interaction terms are the reference levels of the factors themselves. In
your example, these seem to be A1 and b1. Assuming they are, the coefficient
for, say, dd$AA3:dd$Bb2 is worked out relative to them.

It also helps to have more descriptive names for your factors and factor
levels. This is why I haven't worked out what yours might be. In a busy day,
yours seem to be a nightmare.

HTH, Mark.
losemind wrote: