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

Gustaf Granath gustaf.granath at ebc.uu.se
Wed Dec 5 20:31:43 CET 2007

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.


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?

Thanks in advance!!

Gustaf Granath

Dept of Plant Ecology
Uppsala University, Sweden

More information about the R-help mailing list