[R] Interpretation of 'Intercept' in a 2-way factorial lm

Peter Dalgaard P.Dalgaard at biostat.ku.dk
Wed Dec 5 20:41:29 CET 2007


Gustaf Granath wrote:
> Hi all,
>
> I hope this question is not too trivial. I can't find an explanation
> anywhere (Stats and R books, R-archives) so now I have to turn to the R-list.
>
> Question:
>
> If you have a factorial design with two factors (say A and B with two
> levels each). What does the intercept coefficient with
> treatment.contrasts represent??
>
> Here is an example without interaction where A has two levels A1 and
> A2, and B has two levels B1 and B2. So R takes as a baseline A1 and B1.
>
> coef( summary ( lm ( fruit ~ A + B, data = test)))
>
>                 Estimate   Std. Error  t value       Pr(>|t|)
> (Intercept)   2.716667   0.5484828   4.953058   7.879890e-04
> A2            6.266667   0.6333333   9.894737   3.907437e-06
> B2            5.166667   0.6333333   8.157895   1.892846e-05
>
> I understand that the mean of A2 is +6.3 more than A1, and
> that B2 is 5.2 more than B1.
>
> So the question is: Is the intercept A1 and B1 combined as one mean
> ("the baseline")? or is it something else? Does this number actually
> tell me anything
> useful (2.716)??
>
> What does the model (y = intercept  + ??) look like then? I can't understand
> how both factors (A and B) can have the same intercept?
>
>   
Consider an AxB crosstable of (fitted) means. Upper left corner is
intercept , add A2, B2, or both to get the other three cells.

-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907



More information about the R-help mailing list