Question: How to regress phenotype ~ gene + covars in limma?
0
3 months ago by
anon209550 wrote:

Hi all:

I am wondering how to perform the regressions phenotype ~ gene + covariates in R using limma with microarray data.

I know how to regress gene ~ phenotype + covariates. For example, if phenotype is BMI and covariates is age and sex, I can write:

design = model.matrix(~ bmi + age + sex, data)
fit = eBayes(lmFit(eset, design))
results = topTable(fit, coef='bmi')


However, this is not the same as bmi ~ gene + age + sex.

modified 3 months ago by Gordon Smyth37k • written 3 months ago by anon209550
Answer: How to regress phenotype ~ gene + covars in limma?
0
3 months ago by
Gordon Smyth37k
Walter and Eliza Hall Institute of Medical Research, Melbourne, Australia
Gordon Smyth37k wrote:

You can't do that in limma. limma is designed to regress gene expression on sample characteristics, not the other way around.

What is the best-practices way to perform the regression that I'm interested in? Simply a for loop over the genes plus lm?