Question: How to regress phenotype ~ gene + covars in limma?
0
gravatar for anon20955
5 weeks ago by
anon209550
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.

All advice appreciated!

ADD COMMENTlink modified 5 weeks ago by Gordon Smyth37k • written 5 weeks ago by anon209550
Answer: How to regress phenotype ~ gene + covars in limma?
0
gravatar for Gordon Smyth
5 weeks 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.

ADD COMMENTlink modified 5 weeks ago • written 5 weeks ago by Gordon Smyth37k

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

ADD REPLYlink written 5 weeks ago by anon209550

Could you elaborate what you are trying to achieve? Are you looking for the most important genes that may affect the phenotype? Perhaps you would be better off doing Lasso regression for that purpose.

ADD REPLYlink written 5 weeks ago by mikhael.manurung50
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 16.09
Traffic: 120 users visited in the last hour