Question: How to model.matrix and makeContrasts for several groups with multiple treatments in limma?

0

Ou, Jianhong •

**1.1k**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$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]]

ADD COMMENT
• link
•
modified 7.8 years ago
by
Naomi Altman •

**6.0k**• written 7.8 years ago by Ou, Jianhong •**1.1k**