How to model.matrix and makeContrasts for several groups with multiple treatments in limma?
1
0
Entering edit mode
Ou, Jianhong ★ 1.3k
@ou-jianhong-4539
Last seen 4 days ago
United States
Hi groups, Suppose that the experiment has three cell-lines: c1, c2, c3 and three treatments: t1, t2, t3 The targets frame: ---------------------------------------------- filename cell_line treatment ---------------------------------------------- filename1 c1 t1 filename2 c2 t1 filename3 c3 t1 filename4 c1 t2 filename5 c2 t2 filename6 c3 t2 filename7 c1 t3 filename8 c2 t3 filename9 c3 t3 ----------------------------------------------- targets<-readTargets("targets.txt",sep=" ",row.names="fileneame") What is the difference among: 1. design<-model.matrix(~-1+factor(targets$cell_line)+factor(targets$t reatment)) 2. design<-model.matrix(~-1+factor(targets$treatment)+factor(targets$c ell_line)) 3. design<-model.matrix(~factor(targets$cell_line)+factor(targets$trea tment)) 4. design<-model.matrix(~factor(targets$treatment)+factor(targets$cell _line)) and how could I make contrasts if I want to compare the difference among the treatments? Thanks a lots. Yours sincerely, Jianhong Ou jianhong.ou@umassmed.edu<mailto:jianhong.ou@umassmed.edu> [[alternative HTML version deleted]]
• 3.2k views
ADD COMMENT
0
Entering edit mode
Naomi Altman ★ 6.0k
@naomi-altman-380
Last seen 3.6 years ago
United States
Dear Jianhong, The order in which you put the factors in the model does not matter. However, the -1 does matter if you do not want to use contrasts. If you are using contrasts, then any of the 4 designs will work fine. The best way to see the difference is to print the design matrix. If you are only interested in pairwise differences among the treatments the contrasts are t1-t2 t1-t3 t2-t3 In that case you are using the cell lines are blocking variables, which is probably what is required. At 01:07 PM 3/11/2011, Ou, Jianhong wrote: >Hi groups, > >Suppose that the experiment has three cell-lines: c1, c2, c3 > and three > treatments: t1, t2, t3 > >The targets frame: > >---------------------------------------------- >filename cell_line treatment >---------------------------------------------- >filename1 c1 t1 >filename2 c2 t1 >filename3 c3 t1 >filename4 c1 t2 >filename5 c2 t2 >filename6 c3 t2 >filename7 c1 t3 >filename8 c2 t3 >filename9 c3 t3 >----------------------------------------------- > > >targets<-readTargets("targets.txt",sep=" ",row.names="fileneame") > >What is the difference among: > >1. >design<-model.matrix(~-1+factor(targets$cell_line)+factor(targets$tre atment)) >2. >design<-model.matrix(~-1+factor(targets$treatment)+factor(targets$cel l_line)) >3. design<-model.matrix(~factor(targets$cell_line)+factor(targets$tre atment)) >4. design<-model.matrix(~factor(targets$treatment)+factor(targets$cel l_line)) > >and how could I make contrasts if I want to compare the difference >among the treatments? > >Thanks a lots. > >Yours sincerely, > >Jianhong Ou > >jianhong.ou at umassmed.edu<mailto:jianhong.ou at="" umassmed.edu=""> > > > > [[alternative HTML version deleted]] > >_______________________________________________ >Bioconductor mailing list >Bioconductor at r-project.org >https://stat.ethz.ch/mailman/listinfo/bioconductor >Search the archives: >http://news.gmane.org/gmane.science.biology.informatics.conductor
ADD COMMENT

Login before adding your answer.

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