Entering edit mode
anon20955
•
0
@anon20955-20571
Last seen 5.7 years ago
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!
What is the best-practices way to perform the regression that I'm interested in? Simply a for loop over the genes plus
lm
?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.