[BioC] linear models and intercepts with LIMMA

Gordon Smyth smyth at wehi.edu.au
Fri Apr 15 12:46:39 CEST 2005


>Date: 14 Apr 2005 13:35:55 -0400
>From: Ramsi Haddad <rhaddad at genetics.wayne.edu>
>Subject: [BioC] linear models and intercepts with LIMMA
>To: bioconductor at stat.math.ethz.ch
>Content-Type: text/plain
>
>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!

It sounds as if you want to four have group effects and still have an 
intercept, which is simply meaningless. You can't create 5 meaningful 
numbers when you only started with 4 groups. Why in the world do you want 
an intercept? What do you think it would mean?

You need to think in terms of what the estimated coefficients mean.

Gordon

>   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
>
>Ramsi
>
>
> > table(group)
>group
>CTL  PE TIL TNL
>  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