limma interaction term
1
0
Entering edit mode
PJ • 0
@pj-8012
Last seen 7.2 years ago
United States

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 

limma interaction model • 1.4k views
ADD COMMENT
1
Entering edit mode

You don't provide a lot of details - what's your experimental design? What does Factor1 or Factor2 contain? - so it's hard to tell what the coefficient names mean, let alone whether you're doing something sensible with your contrasts.

ADD REPLY
0
Entering edit mode
@gordon-smyth
Last seen 55 minutes ago
WEHI, Melbourne, Australia

You model has 3 degrees of freedom for interaction. To test for interaction you would do:

fit <- lmFit(y, design)
fit <- eBayes(fit)
topTable(fit, coef=6:8)

There is no need to use makeContrasts().

Note that you must test all 3 df together. Trying to do separate tests for individual interaction contrasts has no meaning.

ADD COMMENT

Login before adding your answer.

Traffic: 450 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6