[R] factors and contrast matrix

From: Assa Yeroslaviz <frymor_at_gmail.com>
Date: Thu 16 Feb 2006 - 23:12:34 EST


Hi,

at the moment I'm trying to understand the limma/affy Packages. I've tried every example I could find to try and understand the ways to create design and contrast matrices. I must admit though, that I can't figure it out. I did a few times the estrogen files from the book "bioinformatics and computational biology solutions using R and Bioconductor". I know it's a difficult question to answer, but I need all the help I can get.
1. how does one suppose to build the design matrix by knowing what one wants to examine? this is the created matrix in the book:

             Intercept ES T48 ES:T48
low10-1.cel          1  0   0     0
low10-2.cel          1  0   0     0
high10-1.cel         1  1   0     0
high10-2.cel         1  1   0     0
low48-1.cel          1  0   1     0
low48-2.cel          1  0   1     0
high48-1.cel         1  1   1     1
high48-2.cel         1  1   1     1

attr(,"assign")
[1] 0 1 2 3
attr(,"contrasts")
attr(,"contrasts")$"factor(estrogen)"
[1] "contr.treatment"
attr(,"contrasts")$"factor(time.h)"
[1] "contr.treatment"

2. There are some design matrices where the first column is full of '1' (intercept). What does it mean? can I do without this column?

3. How do I create the contrast matrix if I want to examine the differences in the gene expression between 10 hours and 48 hours? ES - with estrogen in 10 hours
T48 - time 48 hours
ES:TS - probes with estrogen and in 48 hours

(Just by the way:
4. does everything has to do with matrices multiplications? )

the book propose this contrast matrix:

> contM <- cbind(es10=c(0,1,0,0), es48=c(0,1,0,1)) > contM

     es10 es48
[1,] 0 0
[2,] 1 1
[3,] 0 0
[4,] 0 1

5. But why? How do I suppose to know it? Is it also a multiplication of some matrices?
6. What stands the columns or the lines for?

I'll be happy for every kind of help I can get. If someone know where I can read about it, it would be also of great need.

THX, Assa

--
Assa Yeroslaviz
Loetzener Str. 15
51373 Leverkusen

	[[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu Feb 16 23:19:09 2006

This archive was generated by hypermail 2.1.8 : Mon 20 Feb 2006 - 14:08:29 EST