Question: edgeR ANOVA-like analysis
gravatar for Tony
2.3 years ago by
Tony0 wrote:

I would like to use edgeR to perform an ANOVA for difference between multiple groups, but am wondering what the best way is to do this. I have an RNA-seq experiment with multiple groups that I modeled without an intercept term (because there is no control group). I find the ANOVA-like test described in the edgeR Useres guide (chapter 3.2.6 for LRT and 4.4.9 for QL F-test approach) very useful, but don't think it's applicable to a model without intercept. What I want to do is an ANOVA where the F-test would test the difference of each group means from grand means being zero. Is it possible to do such an analysis in edgeR? Would I need to define an additional intercept term for this? Please let me know if I didn't state my question clearly enough. Thank you very much in advance

rnaseq edger anova • 936 views
ADD COMMENTlink modified 2.3 years ago by Aaron Lun24k • written 2.3 years ago by Tony0
Answer: edgeR ANOVA-like analysis
gravatar for Aaron Lun
2.3 years ago by
Aaron Lun24k
Cambridge, United Kingdom
Aaron Lun24k wrote:

You don't need an intercept to do an ANODEV. All you need is to specify the relevant contrasts with makeContrasts, and pass that to glmLRT or glmQLFTest via the contrast argument. Let's say you have groups A, B and C, and you want to look for DE between any of the groups. You would do:

con <- makeContrasts(A - B, A - C, levels=design)

(The null hypotheses are defined by equality of the above expressions to zero.) You don't need to specify B - C because this is implied from the other two contrasts. Namely, if we have stated that A - B = 0 and A - C = 0, then it follows that B - C = 0. Note that the setup above is the same as testing each group against the grand mean (A + B + C)/3, but without the hassle of actually writing out the expression for the grand mean. If you were to explicitly formulate a contrast involving the grand mean, it would just cancel out:

A - (A + B + C)/3 = 0 # A against the grand mean
B - (A + B + C)/3 = 0 # B against the grand mean
A - B = 0
ADD COMMENTlink modified 2.3 years ago • written 2.3 years ago by Aaron Lun24k

Thanks a lot for your reply Aaron. I'm not sure if I completely understood why the grand means would cancel out. So if I have 10 groups, testing contrast of any one group against the 9 others should then be equivalent to testing each of the 10 groups against the grand means, correct?

ADD REPLYlink written 2.3 years ago by Tony0

No, for N groups, you require N-1 contrasts to do an ANODEV test. Pick one group arbitrarily and form contrasts of every other group against that one. (It doesn't matter which one you pick, you'll get the same p-values.)

ADD REPLYlink written 2.3 years ago by Ryan C. Thompson7.3k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 16.09
Traffic: 338 users visited in the last hour