[R] limma design matrix

statfan irene_vrbik at hotmail.com
Sun Mar 25 19:57:56 CEST 2012


I am trying to construct my design matrix needed in the {limma} function
"lmfit" but am having trouble with the formula I am to specify in the
function "model.matrix".  Namely when to I use ~0 + factors (ex 1) vs ~-1 +
factors (ex 2).  Any clarification on this would be greatly appreciated. 
Thanks in advanced.  

Ex 1:
  f <- factor(targets$Target, levels=c("RNA1","RNA2","RNA3"))
design <- model.matrix(~0+f)
[page 409, of Bioinformatics and computational biology solutions using R and
Bioconductor]

and 

Ex 2:
library(ALL)
pdat <- pData(ALL)
design <- model.matrix(~-1 + factor(pdat$type) 
[page 237, of Bioinformatics and computational biology solutions using R and
Bioconductor]



--
View this message in context: http://r.789695.n4.nabble.com/limma-design-matrix-tp4503651p4503651.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list