[BioC] limma's eBayes error: No residual degrees of freedom in linear model
Gordon Smyth
smyth at wehi.edu.au
Sun Nov 20 23:11:12 CET 2005
>[BioC] limma's eBayes error: No residual degrees of freedom in linear
>model
>Li,Qinghong,ST.LOUIS,Molecular Biology Qinghong.Li at rdmo.nestle.com
>Thu Nov 17 21:40:38 CET 2005
>
>Dear Gordon,
>
>I would like to thank you for pointing out the problem. This is the
>first time I tried to use Limma. The main reference materials I used
>is the Ch. 23 of Book Bioinformatics and Comp. Biol. solutions Using R
>and BioC. and the lab notes from microarray short course @ IBC 2004.
>In particular, the example I was following was the 23.10 in the book,
>factorial designs where we have five chips, 2 for WT and 3 for
>Mutants. In each genotype, there are unstimulated and stimulated. I
>thought that resembled the experimental designs in my case (target
>file):
>
>FileName Sib Sex Treatment
>anim1 1 M C
>anim2 2 F C
>anim3 3 M C
>anim4 3 F C
>anim5 1 M R
>anim6 2 F R
>anim7 3 M R
>anim8 3 F R
>
>Where Sib indicates sibling pairs: anim1 and anim5 are siblings and so
>forth. My question is quite simple: I would like to know if there is
>any difference between C and R in treatment for now. Although I might
>be interested in the gender effect (and/or gender*treatment) in a
>later time.
>
>First, I read in all CEL files and normalized the chips using Limma
>package and it looked quite good in diagnostic plots. Say I called
>that file "eset", which is an exprSet file. I used the following
>scripts to create the design matrix:
>
>> TBS<-paste(target$Treatment, target$Sex, target$Sib, sep=".")
>> TBS<-factor(TBS, levels=unique(TBS))
>> design<-model.matrix(~0+TBS)
>> colnames(design)<-levels(TBS)
>
>>cont.matrix<-makeContrasts(diff=
>(C.M.1+C.F.2+C.M.3+C.F.3)-(R.M.1+R.F.2+R.M.3+R.F.3))
>
>model fitting:
>>fit1<-lmFit(eset,design)
>>fit2<-contrasts.fit(fit1, cont.matrix)
>>fit3<-eBayes(fit2) (this is where I got the error message)
>
>Best wishes,
>Johnny
Thanks for your detailed explanation here which makes what you're doing far
clearer. I've just realised what the reasoning was behind your analysis, so
I'll add a few more comments to my previous email.
I see that you're trying to extend the two-factor example in the book
chapter to three factors. You can't do this because you don't have enough
data. Your 3-way factorial model would generate 3 x 2 x 2 = 12 factor
combinations, so you would need at least 13 arrays whereas you only have 8.
There actually is no need to fit a 3-way factorial model. Sib pairs are not
a factor but rather a blocking variable. You do not need to allow for
interactions between Sib pairs and the other two factors.
Best wishes
Gordon
More information about the Bioconductor
mailing list