[BioC] Design matrix for simple time course

Ben Bolstad bmb at bmbolstad.com
Fri Mar 3 18:01:33 CET 2006


> I have five time points with three replicated arrays at each time point.
> I want to set up the design matrix.
> 
> I tried using:
> 
> 	model.matrix(~factor(rep(1:5,each=3)))
> 
> Vaguely following the tutorial here
> (http://bioinf.wehi.edu.au/marray/jsm2005/lab5/lab5.html)
> 
> However, I only have one factor to model, time.
> 
> The matrix that comes out as the first column all of ones, the
> intercept.  What I (think) I want is the first column to have three 1's
> and the rest 0's.

Perhaps what you are looking for is:

model.matrix(~-1+factor(rep(1:5,each=3)))



More information about the Bioconductor mailing list