Search
Question: edgeR ANOVA-like analysis
0
gravatar for Tony
21 months ago by
Tony0
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

ADD COMMENTlink modified 21 months ago by Aaron Lun21k • written 21 months ago by Tony0
2
gravatar for Aaron Lun
21 months ago by
Aaron Lun21k
Cambridge, United Kingdom
Aaron Lun21k 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 21 months ago • written 21 months ago by Aaron Lun21k

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 21 months 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 21 months ago by Ryan C. Thompson7.0k
Please log in to add an answer.

Help
Access

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