loop design matrix
2
0
Entering edit mode
@gordon-smyth
Last seen 5 hours ago
WEHI, Melbourne, Australia
> Date: Wed, 11 Jan 2006 10:50:16 -0700 > From: Matthew Scholz <schmatthew at="" gmail.com=""> > Subject: [BioC] loop design matrix > To: bioconductor at stat.math.ethz.ch > > I'm confused about my design matrix for a loop design experiment. This is a > six-membered direct design that can be drawn as a hexagram inscribed in a > hexagon (where the corners are treatments, obviously). > > Here is what my targets look like: > > Cy3 Cy5 > A B > B C > C D > D E > E RC > RC A > A C > B D > C E > D RC > E A > RC B > > There are three ways I can conceive of constructing my design matrix for > this. The first is to use the modelMatrix function with the parameters > argument, but I don't really understand how this should be done, and this > might be my problem. The second is to declare an arbitrary reference and use > the modelMatrix function, as described in the user's manual: > > designmatrix <- modelMatrix(targets, ref="RC") > > When I do this I get the following design matrix > > A B C D E > -1 1 0 0 0 > 0 -1 1 0 0 > 0 0 -1 1 0 > 0 0 0 -1 1 > 0 0 0 0 -1 > 1 0 0 0 0 > -1 0 1 0 0 > 0 -1 0 1 0 > 0 0 -1 0 1 > 0 0 0 -1 0 > 1 0 0 0 -1 > 0 1 0 0 0 This design matrix is perfectly correct. > Which is fine, except when I use this to fit my data: > > designfit <- lmFit(RG, design=designmatrix, method="ls") > > I see the following annotation in the generated data: > > Warning message: > design matrix is singular The warning message you report cannot be produced by the command that you give. This particular warning can only be produced by subsetting your data object to reduce the number of arrays, which you must have done elsewhere during your R session. Your confusion seems to be simply that you are not keeping track correctly of which commands produce which output. >>From reading threads on the listserv, I understand this to mean that some of > the coefficients are non-estimable, but I don't know why this is the case. > So as a third possibility, I thought I might create my own design matrix. I > came up with the following matrix, which is apparently also wrong: > > A B C D E RC > [1,] 1 -1 0 0 0 0 > [2,] 0 1 -1 0 0 0 > [3,] 0 0 1 -1 0 0 > [4,] 0 0 0 1 -1 0 > [5,] 0 0 0 0 1 -1 > [6,] -1 0 0 0 0 1 > [7,] 1 0 -1 0 0 0 > [8,] 0 1 0 -1 0 0 > [9,] 0 0 1 0 -1 0 > [10,] 0 0 0 1 0 -1 > [11,] -1 0 0 0 1 0 > [12,] 0 -1 0 0 0 1 > > I say it's apparently wrong because when I fit the data, I get the > following: > >> designfittest = lmFit(RGAn, design=design, method="ls") > Coefficients not estimable: RC > > Is this due to the same singularity problem? Before there was no singularity problem. Now there is. > I did note on another web site > (http://discover.nci.nih.gov/microarrayAnalysis/Experimental.Design. jsp) > that it is sometimes desirable to append the matrix with a row of 1's to > force a single solution to the fit and wondered if this was what I was > missing. There's no need for this. If there was a need, it was say so in the User's Guide. > I know a few other people who are struggling with this same type > of issue, and we'd all love some clarification. > > Thanks, > Matt Has the above clarified the matter? Otherwise I'm a bit at a loss because the package gave you the correct design matrix first up, and correctly reported when you did something wrong. You could proceed as in the example in section 7.4 of the User's Guide. What else would help? Best wishes Gordon
Annotation Annotation • 941 views
ADD COMMENT
0
Entering edit mode
@matthew-scholz-1563
Last seen 10.4 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20060112/ 347ce19a/attachment.pl
ADD COMMENT
0
Entering edit mode
@matthew-scholz-1563
Last seen 10.4 years ago
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20060112/ 69e4e341/attachment.pl
ADD COMMENT
0
Entering edit mode
On Fri, January 13, 2006 2:22 am, Matthew Scholz wrote: >On 1/12/06, Gordon K Smyth <smyth at="" wehi.edu.au=""> wrote: >> > Date: Wed, 11 Jan 2006 10:50:16 -0700 >> > From: Matthew Scholz <schmatthew at="" gmail.com=""> >> > Subject: [BioC] loop design matrix >> > To: bioconductor at stat.math.ethz.ch >> > >> > I'm confused about my design matrix for a loop design experiment. This >> is a >> > six-membered direct design that can be drawn as a hexagram inscribed in >> a >> > hexagon (where the corners are treatments, obviously). >> > >> > Here is what my targets look like: >> > >> > Cy3 Cy5 >> > A B >> > B C >> > C D >> > D E >> > E RC >> > RC A >> > A C >> > B D >> > C E >> > D RC >> > E A >> > RC B >> > >> > There are three ways I can conceive of constructing my design matrix for >> > this. The first is to use the modelMatrix function with the parameters >> > argument, but I don't really understand how this should be done, and >> this >> > might be my problem. The second is to declare an arbitrary reference and >> use >> > the modelMatrix function, as described in the user's manual: >> > >> > designmatrix <- modelMatrix(targets, ref="RC") >> > >> > When I do this I get the following design matrix >> > >> > A B C D E >> > -1 1 0 0 0 >> > 0 -1 1 0 0 >> > 0 0 -1 1 0 >> > 0 0 0 -1 1 >> > 0 0 0 0 -1 >> > 1 0 0 0 0 >> > -1 0 1 0 0 >> > 0 -1 0 1 0 >> > 0 0 -1 0 1 >> > 0 0 0 -1 0 >> > 1 0 0 0 -1 >> > 0 1 0 0 0 >> >> This design matrix is perfectly correct. >> >> > Which is fine, except when I use this to fit my data: >> > >> > designfit <- lmFit(RG, design=designmatrix, method="ls") >> > >> > I see the following annotation in the generated data: >> > >> > Warning message: >> > design matrix is singular >> >> The warning message you report cannot be produced by the command that you >> give. This particular >> warning can only be produced by subsetting your data object to reduce the >> number of arrays, which >> you must have done elsewhere during your R session. Your confusion seems >> to be simply that you >> are not keeping track correctly of which commands produce which output. > >The confusion is not *simply* that I am not keeping track of output. As I've >already stated, this message appears in the generated data (the data >object), not in the output. I'm sorry that you're finding the design matrix confusing. This is a difficult topic, but I've tried hard to make the process as smooth as possible in the limma package and in the documentation. Your particular question here remains very hard to understand. You say that you've found this warning message in a data object, but limma commands do not imbed warning messages in data objects. And the particular limma command that you give doesn't generate this particular warning message either at the screen or in a data object. Is it possible that you are not using limma directly, but are using it through a third-party interface of some sort? If so, please tell us what software you are using and how you are using it. Perhaps you are using R functions written by someone else. Is it possible that there are R functions being used, other than those in limma and publicly available packages, that you don't see? If you are writing all your own R code, you need to give us the actual code that produced the warning message. You need to tell us what the data object was and in what part of it you found the warning message. Give us the R commands which created the object, and the commands which you used to extract the warning message. In other words, cut and paste a session from your computer which produces the warning message, without editing anything out. If the session output is very long, it might be a good idea to try create a session with produces less output but still gives the same warning message. But the important thing is not to edit anything out. Best wishes Gordon
ADD REPLY
0
Entering edit mode
An embedded and charset-unspecified text was scrubbed... Name: not available Url: https://stat.ethz.ch/pipermail/bioconductor/attachments/20060112/ 096bd78a/attachment.pl
ADD REPLY

Login before adding your answer.

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