Hi, I am using limma to do a multiple group analysis using Affymatrix data. I am trying to perform analysis for 12 samples which are from control (C) and disease (D) group and these are either treated with drug (S) or not (N). The replicas are not consistence across the group. I run the following code:
types <- factor(types, levels=c("C.S","C.N","D.S","D.N"))
design <- model.matrix(~ 0+types)
colnames(design) <- levels(types)
contrast.matrix <- makeContrasts(C.SvsN=C.S-C.N,
+ D.SvsN=D.S-D.N,
+ Diff=(D.S-D.N)-(C.S-C.N),
+ levels=design)
But when I run the below code
fit <- lmFit(exprs(eset),design)
I get the error message:
"Coefficients not estimable: C.N D.N "
"Error in lm.fit(design, t(M)) : incompatible dimensions"
I will really appreciate if someone can help me to understand this error and help me to debug this problem.
Thanks, Riya
A few comments might prove helpful. Firstly, can you post the model matrix? The error message suggests that you're using either a not-so-great experimental setup or (more likely) that there's simply a better model to use that doesn't have the non-estimable coefficients problem. Secondly, have you considered simply using a factorial design? I suspect this is the real answer to your problem. Have a look at section 8.5 in the limma users guide.