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!