Dear all, dear Michael Love,
The DESeqDataSetFromHTSeqCount() function does not want to accept my design, which is (as suggested by the deseq2 manual):
design = model.matrix(~group + group:subjectID + group:time)
Group Time SubjectID
A 1 1
A 2 1
A 1 2
A 2 2
A 1 3
A 2 3
A 1 4
A 2 4
A 1 5
A 2 5
B 1 1
B 2 1
B 1 2
B 2 2
B 1 3
B 2 3
B 1 4
B 2 4
B 1 5
B 2 5
B 1 6
B 2 6
As you can see, I have one subject more in group B than in group A. Therefore I deleted the collumn 'GroupA:subjectID6' from the designmatrix.
But still, the following error occurs: 'The model matrix is not full rank. One or more variables or interaction terms in the design formula are linear combinations of the others and must be removed.'
Who knows the answer to this problem? Has this something to do with the fact that subject 6 in group B is now a linear combination when comparing B16 to B26? But how to solve this, without losing subject 6?
Many thanks in advance,
Sara
Are you completely sure you want subject as a factor in your design? Is subject 1 from group A really the same as subject 1 in group B? I have no idea what you are trying to compare to what, but I think in general, a lot of people try to include subject or individual as a factor in their design where their experimental design does not warrant it.
It's group x subject, so a subject specific blocking term within each group. See the section of the vignette that describes this design.