[BioC] LIMMA : trying to take contrast of non estimable coefficient
James W. MacDonald
jmacdon at med.umich.edu
Wed Dec 28 15:25:43 CET 2011
Hi Guillaume,
On 12/28/2011 4:00 AM, Guillaume Meurice wrote:
> Dear list,
>
> I'm using Agilent 44K microarray. We have 20 cases study. For each one we hybridized sample before and after treatment on the same array, in dye-swap.
>
> I have the following design matrix (build manually, to follow the group-mean parametrization approach) :
>
> ===
> Intercept liver other R N RepClass.Unk PD PR SD
> 1 1 1 0 1 0 0 0 0 1
> 2 -1 1 0 1 0 0 0 0 1
> 3 1 1 0 0 1 0 1 0 0
> 4 -1 1 0 0 1 0 1 0 0
> 5 1 1 0 1 0 0 0 0 1
> 6 -1 1 0 1 0 0 0 0 1
> 7 1 1 0 0 1 0 0 0 1
> 8 -1 1 0 0 1 0 0 0 1
> 9 1 1 0 1 0 0 0 0 1
> 10 -1 1 0 1 0 0 0 0 1
> 11 1 0 1 0 1 0 1 0 0
> 12 -1 0 1 0 1 0 1 0 0
> 13 1 0 1 0 0 1 0 0 1
> 14 -1 0 1 0 0 1 0 0 1
> 15 1 0 1 1 0 0 0 0 1
> 16 -1 0 1 1 0 0 0 0 1
> 17 1 0 1 0 1 0 1 0 0
> 18 -1 0 1 0 1 0 1 0 0
> 19 1 1 0 1 0 0 0 0 1
> 20 -1 1 0 1 0 0 0 0 1
> 21 1 0 1 1 0 0 0 0 1
> 22 -1 0 1 1 0 0 0 0 1
> 23 1 0 1 1 0 0 0 1 0
> 24 -1 0 1 1 0 0 0 1 0
> 25 1 0 1 1 0 0 0 0 1
> 26 -1 0 1 1 0 0 0 0 1
> 27 1 0 1 0 1 0 1 0 0
> 28 -1 0 1 0 1 0 1 0 0
> 29 1 1 0 1 0 0 1 0 0
> 30 -1 1 0 1 0 0 1 0 0
> 31 1 0 1 0 0 1 0 0 1
> 32 -1 0 1 0 0 1 0 0 1
> 33 1 0 1 0 1 0 1 0 0
> 34 -1 0 1 0 1 0 1 0 0
> 35 1 1 0 1 0 0 0 0 1
> 36 -1 1 0 1 0 0 0 0 1
> 37 1 1 0 0 0 1 0 0 1
> 38 -1 1 0 0 0 1 0 0 1
> 39 1 0 1 0 1 0 1 0 0
> 40 -1 0 1 0 1 0 1 0 0
> ===
>
> Intercept : term to catch dye bias
> Liver / other : main source of variability among my samples
> R/N/Rep.Class.Unk : status of my samples (responder/nor responding/unknown status)
> PD/PR/SD : Experimentally observed variable.
>
> First, I want to get the gene differentially expressed between R and N :
> ==
> fit<- lmFit(X, design)
> cont.matrix<- makeContrasts("RvsN" = R-N,levels=design)
> fit2<- contrasts.fit(fit, cont.matrix)
> fit2<- eBayes(fit2)
> ==
> It works fine.
>
>
> Then I want to get genes differentially expressed between PD and SD :
> ===
> fit<- lmFit(X, design)
> cont.matrix<- makeContrasts("PDvsSD" = PD-SD,levels=design)
> fit2<- contrasts.fit(fit, cont.matrix)
> ===
>
> Here I get an error :
>
> Error in contrasts.fit(fit, cont.matrix) :
> trying to take contrast of non-estimable coefficient
>
>
> I can't see why I raised this error in this particular case.
> Can you please provided any help on this ?
Your design matrix is not full rank. In other words, at least one column
is a linear combination of other columns. This is why it is usually best
to use functionality to create the design matrix, rather than trying to
create one by yourself.
However, if you really want to create your own design matrix, you can
always test it using functions in limma.
> is.fullrank(design)
[1] FALSE
> nonEstimable(design)
[1] "RepClass.Unk" "SD"
So both your RepClass.Unk and SD columns are linear combinations of
other existing columns. See also ?modelMatrix.
Best,
Jim
>
>
>
>
> Many thanks.
> --
> Guillaume
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives: http://news.gmane.org/gmane.science.biology.informatics.conductor
--
James W. MacDonald, M.S.
Biostatistician
Douglas Lab
University of Michigan
Department of Human Genetics
5912 Buhl
1241 E. Catherine St.
Ann Arbor MI 48109-5618
734-615-7826
**********************************************************
Electronic Mail is not secure, may not be read every day, and should not be used for urgent or sensitive issues
More information about the Bioconductor
mailing list