Question: The meaning of interaction terms in design matrix in edgeR User's Guide on page 38
0
4 weeks ago by
Germany, Dresden, TUD
2002ymx020 wrote:

Hi Prof. Gordon Smyth,

I have a question about the meaning of interaction terms in design matrix on the page 38 in the edgeR User's Guide. In line 19, the guide say: "The last two coefficients give the DrugvsPlacebo.1h and DrugvsPlacebo.2h contrasts". But my understanding is that the last two coefficients ( [5] "TreatDrug:Time1h", [6] "TreatDrug:Time2h" in model.matrix(~Treat * Time, data=targets)) could be the difference of difference, which means the effects (Drug.1h-placbo.1h)-(Drug.0h-placebo.0h) and (Drug.2h-placbo.2h)-(Drug.0h-placebo.0h). (Drug.0h-placebo.0h) is the reference level for interaction. Is my understanding right?

Best, Mingxing Yang

edger • 61 views
modified 4 weeks ago by Gordon Smyth38k • written 4 weeks ago by 2002ymx020
Answer: The meaning of interaction terms in design matrix in edgeR User's Guide on page
0
4 weeks ago by
Gordon Smyth38k
Walter and Eliza Hall Institute of Medical Research, Melbourne, Australia
Gordon Smyth38k wrote:

Yes, your understanding is correct but so is the edgeR User's Guide.

The DrugvsPlacebo.1h and DrugvsPlacebo.2h contrasts are defined on page 36 of the Guide, and they are exactly equivalent to what you say they should be.

Thank you for your time, Gordon. Actually, my understanding of interaction terms [5] "TreatDrug:Time1h", [6] "TreatDrug:Time2h" are (Drug.1h-placbo.1h)-(Drug.0h-placebo.0h) and (Drug.2h-placbo.2h)-(Drug.0h-placebo.0h) respectively, which are different from the definition on page 36 of the Guide: DrugvsPlacebo.1h = (Drug.1h-Drug.0h)-(Placebo.1h-Placebo.0h), DrugvsPlacebo.2h = (Drug.2h-Drug.0h)-(Placebo.2h-Placebo.0h)

That is why I asked this question. Because this is very confusing and only a few people understand this, that is why I only asked you this question.

Best, Mingxing Yang

Simple arithmetic shows you that the two expressions are exactly the same:

(Drug.1h - Placbo.1h) - (Drug.0h - Placebo.0h)

= Drug.1h - Placebo.1h - Drug.0h + Placebo.0h

= (Drug.1h - Drug.0h) - (Placebo.1h - Placebo.0h)