Baseline comparison using "Comparisons both between and within subjects"
1
0
Entering edit mode
dustar1986 ▴ 10
@dustar1986-10108
Last seen 7.2 years ago

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

edgeR • 1.2k views
ADD COMMENT
1
Entering edit mode
@gordon-smyth
Last seen 2 hours ago
WEHI, Melbourne, Australia

Making the baseline comparison with this model is not possible using edgeR, because edgeR assumes that samples are independent whereas repeated measurements on the same individual are correlated.

You can do the analysis using limma with duplicateCorrelation(), see the section of the limma User's Guide on "Multi-level designs".

In the edgeR, you would have to analyse all the "None" samples separately to the "Hormone" samples to make the baseline comparison.

 

ADD COMMENT
0
Entering edit mode

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:

Disease Patient Treatment
Healthy 1 None
Healthy 2 None
Healthy 3 None
Disease1 1 None
Disease1 2 None
Disease1 3 None
Disease2 1 None
Disease2 2 None
Disease2 3 None

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...)?

ADD REPLY
0
Entering edit mode

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.

ADD REPLY
0
Entering edit mode

Thanks a lot, Gordon. This is really helpful.

ADD REPLY

Login before adding your answer.

Traffic: 753 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