Hello,
I'm trying to use a model like what described in Chapter 3.5 "Comparisons both between and within subjects" of EdgeR users' manual:
Disease Patient Treatment 1 Healthy 1 None 2 Healthy 1 Hormone 3 Healthy 2 None 4 Healthy 2 Hormone 5 Healthy 3 None 6 Healthy 3 Hormone 7 Disease1 1 None 8 Disease1 1 Hormone 9 Disease1 2 None 10 Disease1 2 Hormone 11 Disease1 3 None 12 Disease1 3 Hormone 13 Disease2 1 None 14 Disease2 1 Hormone 15 Disease2 2 None 16 Disease2 2 Hormone 17 Disease2 3 None 18 Disease2 3 Hormone
design <- model.matrix(~Disease+Disease:Patient+Disease:Treatment)
Where Healthy and None are the baseline for Disease and Treatment, respectively.
My question is, in this model how can I compare the difference between Healthy None and Disease1 None.
I cannot find a suitable contrast to do the job from its model matrix. How can I change the model to include this effect, if I still wanna nest individuals and treatments within Disease?
Thank you very much.
David
Thanks Gordon. I'll dig more about limma. May I ask some further questions about the separated analysis of "None" samples? Can I create a subset of the original data frame that only contains "None" Treatment. Then I build a simple design:
design <- model.matrix(~Disease)
Then coef="DiseaseDisease1" will give me the difference between "Healthy None" and "Disease1 None". Am I on the right track?
In this study I also need the original model to compare the treatment difference between diseases, which means I'm going to use two different models to answer different questions. Is this the correct thing to do? Or should I build a uniform model to include all the desired comparisons (which I don't know how to...)?
Yes, that's how to do it in edgeR. As you say, you would need one model for the baseline and another for the Hormone vs None comparisons.
To do it all with a uniform model, that can only be done in limma.
Thanks a lot, Gordon. This is really helpful.