[BioC] Design Matrix Question

Kenny Ye kye at ams.sunysb.edu
Wed Oct 22 22:03:16 MEST 2003

```Regardless of what it should be called, it is what the data.frame should
look like for the comparison of three different treatments DIF1, DIF2,
DIF3. The problem can be viewed as two way anova, in which the dye can be
seen as the blocking factor. The treatment factor has three levels so it
need to be decomposed to two contrasts for linear regression. Both
R-functions lm and aov takes the qualitative factor as explanatory
variable directly and apply default decomposition ``contr.treatment''.
Notice that the response of the ANOVA would be treatment/notreatment ratio
or its log(transformation).

I am no idea about limma, it should offer more. From Gordon's
description, it takes readings from both channels, so allows comparison
between treatments from both channels. Jason, follow
Gordon's suggestion if you would also like to compare treatments to no
treatment.

If the purpose of Jason's study is to compare three drugs, then the loop
design suggested by Katie Kerr and Gary Chunchill would be more efficient.

Kenny

Kenny Ye
Assistant Professor
Department of Applied Math and Statistics
SUNY at  Stony Brook
Stony Brook, New York 11794-3600
Phone (631)632-9344
Fax   (631)632-8490

On Thu, 23 Oct 2003, Gordon K Smyth wrote:

> This isn't a design matrix, it's a data matrix (from which a design matrix
> might be computed).
>
> Assuming the intention is to set up an design matrix for use in limma, the
> recommended command is
>
>    designMatrix(targets, ref)
>
> where 'targets' has a columns 'cy3' giving the channel1 treatment and
> 'cy5' giving the channel2 treatment and 'ref' is just the name of the
> common reference.
>
> In limma 1.3.0 (available next week) there is a function 'readTargets' for
> reading in the target info.  In the meantime, just set up the info in
> Excel, write to disk as a tab-delimited file, read into R using
>
> Gordon
>
> > this is what I would put your experiment in a design matrix
> >
> > Slide Treatment Dye
> > 1	DIF1	-1
> > 2       DIF1     1
> > .
> > .
> > 6	DIF1	-1
> > 7	DIF2	-1
> > .
> > .
> > 12	DIF2	-1
> > 13	DIF3	-1
> > 14	DIF3	 1
> > .
> > .
> > 18	DIF3	-1
> >
> > Then you can use ANOVA to compare the different drugs.
> >
> > Kenny
> >
> >
> > Kenny Ye
> > Assistant Professor
> > Department of Applied Math and Statistics
> > SUNY at  Stony Brook
> > Stony Brook, New York 11794-3600
> > Phone (631)632-9344
> > Fax   (631)632-8490
> >
> > On Wed, 22 Oct 2003, Jason Skelton wrote:
> >
> >> Kenny Ye wrote:
> >>
> >> >what is your treatments?  and what is the level 0? would you please
> >> give more details on your experiment?
> >> >
> >> >Kenny
> >> >
> >> Hi kenny
> >>
> >> Apologies my understanding of how a matrix works isn't necessarily
> >> correct The 0 indicates that they are NOT present in a particular
> >> treatment
> >>
> >>
> >> I'm currently using R: Version 1.7.1
> >>
> >> DIF1,2 and 3 are different but similar drugs...............
> >>
> >> Slides 1-6 are treatment 1 (DIF1) Vs No treatment
> >> Slide1 Cy5/Cy3 (DIF1/no treatment)
> >> Slide2 Cy3/Cy5 (DIF1/no treatment)
> >> Slide3 Cy5/Cy3 (DIF1/no treatment)
> >> Slide4 Cy3/Cy5 (DIF1/no treatment)
> >> Slide5 Cy3/Cy5 (DIF1/no treatment)
> >> Slide6 Cy5/Cy3 (DIF1/no treatment)
> >>
> >> Slides 7-12 are treatment 2 (DIF2) Vs No treatment
> >> Slide7 Cy5/Cy3 (DIF2/no treatment)
> >> Slide8 Cy3/Cy5 (DIF2/no treatment)
> >> Slide9 Cy5/Cy3 (DIF2/no treatment)
> >> Slide10 Cy3/Cy5 (DIF2/no treatment)
> >> Slide11 Cy3/Cy5 (DIF2/no treatment)
> >> Slide12 Cy5/Cy3 (DIF2/no treatment)
> >>
> >> Slides 13-18 are treatment 3(DIF3) Vs No treatment
> >> Slide13 Cy5/Cy3 (DIF3/no treatment)
> >> Slide14 Cy3/Cy5 (DIF3/no treatment)
> >> Slide15 Cy5/Cy3 (DIF3/no treatment)
> >> Slide16 Cy3/Cy5 (DIF3/no treatment)
> >> Slide17 Cy3/Cy5 (DIF3/no treatment)
> >> Slide18 Cy5/Cy3 (DIF3/no treatment)
> >>
> >> I'd obviously like to compare across the different treatments DIF1,2
> >> and 3
> >>
> >>
> >>
> >> Thanks
> >>
> >> Jason
> >>
> >>
> >> >>Hi
> >> >>
> >> >>I'd like to construct a design matrix similar to the following but
> >> have  no idea how to do it
> >> >>
> >> >>I'm trying the model.matrix function
> >> >>
> >> >>Slide	Treatment1	Treatment2	Treatment3
> >> >>1	-1		0		0
> >> >>2	1		0		0
> >> >>3	-1		0		0
> >> >>4	1		0		0
> >> >>5	1		0		0
> >> >>6	-1		0		0
> >> >>7	0		-1		0
> >> >>8	0		1		0
> >> >>9	0		-1		0
> >> >>10	0		1		0
> >> >>11	0		1		0
> >> >>12	0		-1		0
> >> >>13	0		0		-1
> >> >>14	0		0		1
> >> >>15	0		0		-1
> >> >>16	0		0		1
> >> >>17	0		0		1
> >> >>18	0		0		-1
> >> >>
> >> >>-1 represents Cy5/cy3
> >> >>1 represents Cy3/Cy5
> >> >>
> >> >>
> >> >>
> >>
> >>
> >> --
> >> --------------------------------
> >> Jason Skelton
> >> Pathogen Microarrays
> >> Wellcome Trust Sanger Institute
> >> Hinxton
> >> Cambridge
> >> CB10 1SA
> >>
> >> Tel +44(0)1223 834244 Ext 7123
> >> Fax +44(0)1223 494919
> >> --------------------------------
> >>
> >>
> >>
> >
> > _______________________________________________
> > Bioconductor mailing list
> > Bioconductor at stat.math.ethz.ch
> > https://www.stat.math.ethz.ch/mailman/listinfo/bioconductor
>
>
>
>

```