[BioC] limma paired samples using block

Dick Beyer dbeyer at u.washington.edu
Tue Feb 15 20:29:20 CET 2005


I am hoping someone can review my model and see if I am using the block argument in lmFit to correctly achieve a paired test.

I have 12 samples made up of 4 people, each person is sampled 0hr, 4hr, and 22hr after exposure.  The 12 slides are affy.  I want to do a paired analysis using lmFit. My data looks like this:

slide   h0 h4 h22  person
1       1  0   0    1
2       0  1   0    1
3       0  0   1    1
4       1  0   0    2
5       0  1   0    2
6       0  0   1    2
7       1  0   0    3
8       0  1   0    3
9       0  0   1    3
10      1  0   0    4
11      0  1   0    4
12      0  0   1    4

design <- model.matrix(~ -1+factor(c(1,2,3,1,2,3,1,2,3,1,2,3)))
colnames(design) <- c("h0","h4","h22")
fit <- lmFit(exprs(exp1.all.gcrma), design, block=c(1,1,1,2,2,2,3,3,3,4,4,4))
cont.matrix <- cbind(h.22.0=c(-1,0,1), h.22.4=c(0,-1,1), h.4.0=c(-1,1,0))
fit2 <- contrasts.fit(fit, cont.matrix)
fit2 <- eBayes(fit2)

Am I using the block argument correctly?  Perhaps an easier question would be to ask how to set up the design and contrast matrix to get a simple paired t-test type of analysis.

base 2.0.1 
datasets 2.0.1 
utils 2.0.1 
grDevices 2.0.1 
graphics 2.0.1 
stats 2.0.1 
methods 2.0.1 
tools 2.0.1 
Biobase 1.5.0 
reposTools 1.5.1 
affy 1.5.8 
xtable 1.2-4 
limma 1.8.6 
matchprobes 1.0.12 
gcrma 1.1.1 
qvalue 1.1 
siggenes 1.2.11

Thanks very much for any help or pointers.
Dick
*******************************************************************************
Richard P. Beyer, Ph.D.	University of Washington
Tel.:(206) 616 7378	Env. & Occ. Health Sci. , Box 354695
Fax: (206) 685 4696	4225 Roosevelt Way NE, # 100
 			Seattle, WA 98105-6099
http://depts.washington.edu/ceeh/ServiceCores/FC5/FC5.html



More information about the Bioconductor mailing list