LIMMA : trying to take contrast of non estimable coefficient
1
0
Entering edit mode
@guillaume-meurice-4494
Last seen 9.6 years ago
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 ? Many thanks. -- Guillaume [[alternative HTML version deleted]]
Microarray Microarray • 2.7k views
ADD COMMENT
0
Entering edit mode
@james-w-macdonald-5106
Last seen 14 hours ago
United States
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
ADD COMMENT
0
Entering edit mode
Dear James, thanks for your quick answer ! > 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. I'm trying to create the design matrix by myself, because in many of the project I have to analyse, there is a lot of parameters and "meta information" that came with the samples. And I have no idea (a priori) of how these meta information contribute to the observed intensity. for example, for a sample, there is the treatment, the tissu where it came from, the observed effect of the treatment using methodology A, the observed effect of the treatment using methodology B, and so on. Usually, I'm trying to have the design matrix that better fit the experimental design, to be sure to catch the specific effect of a given parameter. > 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. many thanks for all these information. I will check all these useful functionalities. Best regards, -- Guillaume
ADD REPLY

Login before adding your answer.

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