edgeR ANOVA-like analysis
1
0
Entering edit mode
Tony • 0
@tony-12608
Last seen 7.7 years ago

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

edger rnaseq anova • 2.3k views
ADD COMMENT
2
Entering edit mode
Aaron Lun ★ 28k
@alun
Last seen 24 minutes ago
The city by the bay

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 COMMENT
0
Entering edit mode

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 REPLY
0
Entering edit mode

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 REPLY

Login before adding your answer.

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