Quantcast

limma design matrix

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

limma design matrix

statfan
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]

Loading...