# [R] R-squared in lm

Prof Brian D Ripley ripley at stats.ox.ac.uk
Fri May 3 10:40:20 CEST 2002

```On Fri, 3 May 2002, Jerome Goudet wrote:

> Dear all,
>
> I'm puzzled by the definition of r-squared used by 'lm' when the model is
> without intercept.
>
> The help for summary says:
>
> >r.squared: R^2, the ``fraction of variance explained by the model'',
> >
> >               R^2 = 1 - Sum(R[i]^2) / Sum((y[i]- y*)^2),
> >
> >           where y* is the mean of y[i] if there is an intercept and
> >           zero otherwise.
>
>
>
> Why, when there is no intercept (when the intercept is set to 0), should
> the average values of the response be 0?

No reason, and that's not what is said.

That is the definition of R^2, the proportion of the total variation
explained.  And the total variation is defined to be about the mean if it
is in the model, and about 0 otherwise.

Think of R^2 as comparing the regression SS with that of a minimal model.
If there is an intercept, the data are assumed to be on an arbitrary
interval scale, so the minimal model has an intercept too. If there is no
intercept, you are saying that 0 is special on the y scale, and the minimal
model is to predict 0.

--
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

```