Hi everybody,
I have a model with 2 main factors and its interaction:
designmodel = model.matrix(~0 + Factor1 + Factor2 + Factor1:Factor2)
Factor 1 has two levels and factor 2 has 4 levels. My question is if when I test the interaction term I can add all 8 groups as follow:
contrastInteraction = makeContrasts(((Factor1.Level1Factor2 - Factor1.Level2Factor2 - Factor1.Level3Factor2 - Factor1.Level4Factor2 ) - (Factor2.Level1Factor2 - Factor2.Level2Factor2 - Factor2.Level3Factor2 - Factor2.Level4Factor2)), levels=design)
Or shoud I test the interaction in 4 separate contrasts (one for each level of factor 2)? Thanks for you advice!
PJ
You don't provide a lot of details - what's your experimental design? What does
Factor1
orFactor2
contain? - so it's hard to tell what the coefficient names mean, let alone whether you're doing something sensible with your contrasts.