Are joint tests of model coefficients in the limma package possible?
2
1
Entering edit mode
@davidcairey-7215
Last seen 9.8 years ago

Are joint tests of model coefficients possible in limma? I'm not asking about contrasts, but if we can test if two or more model coefficients are different from zero. An example might be if you wanted to test group AND group*time coefficients in a model with group, time, and group*time terms, to understand the total effect of group, which requires a joint test of all terms in which group is included. This can be done via an F-test (or LRT) of full (group, time, group*time) and reduced models (time), typically. In reading the limma manual, I've missed this useful test. Can it be done inside the limma commands. Is there an example someone can point to?

 

 

 

 

limma • 1.3k views
ADD COMMENT
3
Entering edit mode
@ryan-c-thompson-5618
Last seen 7 weeks ago
Icahn School of Medicine at Mount Sinai…

Yes, to perform an F-test on multiple coefficients, you simply have to pass a vector of multiple coefficients as the coef argument to topTable, or a multi-column contrast matrix to contrasts.fit. There are some examples of this usage in the Limma User's Guide, such as Section 9.7: Multi-level Experiments.

ADD COMMENT
0
Entering edit mode
@davidcairey-7215
Last seen 9.8 years ago

 

Hi Ryan. I just re-read section 9.7 and I did not see any example. But you encouraged me to read around this area. Right above in section 9.6.2, it does give an example of a "moderated F-test" for spline model:

> library(splines)
> X <- ns(targets$Time, df=5)

Then fit separate curves for the control and treatment groups:

> Group <- factor(targets$Group)
> design <- model.matrix(~Group*X)
> fit <- lmFit(y, design)
> fit <- eBayes(fit)

This creates a model with 12 parameters, with the last 5 corresponding to interaction, i.e., to differences in the curves between groups. To detect genes with different time trends for treatment vs control:

> topTable(fit, coef=8:12)

So this is a joint test of the coefficients representing the interaction with a flexible spline curve being allowed. I'm assuming if I also passed the group coefficients, then THAT moderated F-test would be what I'm after. I appreciate the help Ryan!!

ADD COMMENT

Login before adding your answer.

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