I am reading the DESeq2 manual (version of 16 Oct 2015), and have a question on the example used in section 3.12 (“Model matrix not full rank"), specifically on the nested model (3.12.1) that deals with testing group-specific effects of a treatment, while controlling for individual effects. The sample assignment of the nested model is this (copied from the manual to allow better reading of this post):

coldata > coldata grp ind cnd ind.n 1 X 1 A 1 2 X 1 B 1 3 X 2 A 2 4 X 2 B 2 5 Y 3 A 1 6 Y 3 B 1 7 Y 4 A 2 8 Y 4 B 2 >

The experimental design is:

design2 <- model.matrix(~ grp + grp:ind.n + grp:cnd)

resulting in this model matrix:

> design2 (Intercept) grpY grpX:ind.n2 grpY:ind.n2 grpX:cndB grpY:cndB 1 1 0 0 0 0 0 2 1 0 0 0 1 0 3 1 0 1 0 0 0 4 1 0 1 0 1 0 5 1 1 0 0 0 0 6 1 1 0 0 0 1 7 1 1 0 1 0 0 8 1 1 0 1 0 1

I understand that the coefficients “grpX:cndB” and “grpY:cndB” represent the effect of condition B vs A in group X resp. Y. Maybe a naive question, but is it is also possible to also extract the differences between the 2 groups? Thus what is the difference between groups X and Y at Condition A (and Condition B)? At first sight I thought this is represented by the 2nd coefficient (grpY), but then I realized this coefficient represents the average of condition A plus B in grpY. Is it thus not possible to make these between-group comparisons using this design?

Thanks,

Guido

After giving my question some more thoughts, I think the difference between group X and Y at condition A is represented by the contrast:

and the difference between group X and Y at condition B:

... but please correct me if I am wrong.

<< EDIT >> I was wrong; see Michael's reply below.