[BioC] linear models and intercepts with LIMMA

Ramsi Haddad rhaddad at genetics.wayne.edu
Thu Apr 14 19:35:55 CEST 2005

Dear List,

	I have been working with LIMMA and I'm a bit confused by the linear
models.  I have a group with 4 factors.  I want to remove covariates
from the main effects before I look at contrasts.  Before I do this, I
was trying out the different combinations of ~ .  When I say
lmFit(~group), this is supposed to calculate an intercept.  This works. 
The problem is that my groupCTL disappears.  If I say lmFit(~ -1 +
group), I gather that the intercept is constrained to (0,0) and that
lmFit(~ 0 + group) does not calculate an intercept.
	My problem is that I want lmFit to give me an intercept and not take
away my groupCTL!  Below is the code showing what I mean.  Everything
works, its just that I want my contrast matrix to include
groupPE-groupCTL, but I can't do this when the intercept is calculated. 

Any assistance in clarifying this matter would be appreciated.  Thanks


> table(group)
 17  22  12  10 

> design.e <- model.matrix(~group)

> colnames(design.e)
[1] "(Intercept)" "groupPE"     "groupTIL"    "groupTNL"   

> design.e <- model.matrix(~-1 + group)

> colnames(design.e)
[1] "groupCTL" "groupPE"  "groupTIL" "groupTNL"

> design.e <- model.matrix(~0 + group)

> colnames(design.e)
[1] "groupCTL" "groupPE"  "groupTIL" "groupTNL"

More information about the Bioconductor mailing list