[BioC] about the model.matrix function?

wang peter wng.peter at gmail.com
Sat Aug 25 02:59:35 CEST 2012

that is what i understand about model matrix

please tell me if it is right? thank you very much

> Treatment <- factor(targets$ Treatment, levels=c("Control","Treatet"))
> Time <- factor(targets$Time, levels=c("0","6"))
> design <- model.matrix(~Treatment* Time)

Coefficient	 Comparison
Intercept 	                                    Control.0
TreatmentTreatet	                  Treatet.0- Control.0
Time6 	                                    Control.6- Control.0
TreatmentTreatet: Time6	(Treatet.6-Treatet.0)-( Control.6- Control.0)

> design <- model.matrix(~Time *Treatment)

Coefficient	 Comparison
Intercept 	                                   0.Control
Time6 	                                   6.Control -0.Control
TreatmentTreatet	                 0.Treatet -0.Control
Time6: TreatmentTreatet	(6.Treatet -6.Control)-(0.Treatet -0.Control)

shan gao
Room 231(Dr.Fei lab)
Boyce Thompson Institute
Cornell University
Tower Road, Ithaca, NY 14853-1801
Office phone: 1-607-254-1267(day)
Official email:sg839 at cornell.edu

More information about the Bioconductor mailing list