[BioC] loop design matrix

Gordon K Smyth smyth at wehi.EDU.AU
Thu Jan 12 23:34:54 CET 2006


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



More information about the Bioconductor mailing list