Linear limma model code
0
0
Entering edit mode
2.5 years ago
ritz ▴ 10

Hi All,

I need some advice on the R code for the limma model. I was running a linear model using limma. But I was wondering how to account for missing values in the covariates. For example:-

Blockquote

design <- model.matrix (~ Stress + Gender + Age + Smoking + BMI + sleep + blood cell types + PCS, pheno) fit <- lmFit(mvals , design)

Error: row dimension of design doesn't match column dimension of data object

dim(mvals) [1] 751 795669 dim(design) [1] 721 47

so for example stress has 1 missing value, BMI has 1 missing value, smoking had 3, sleep has 25.

I was wondering how to account for this in the fit command? I have previously used: fit <- lmFit(mvals[,!is.na(pheno$stress)], design) but I get errors when I do add more covariates missing values.

It would be great if someone could help me out!

Thankyou!

Limma linear regression rcode • 418 views
ADD COMMENT

Login before adding your answer.

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