[R] R-squared in lm
Jerome Goudet
Jerome.Goudet at ie-zea.unil.ch
Fri May 3 10:07:54 CEST 2002
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?
Many thanks for any enlightments!
Prof. Jerome GOUDET
Institut d'Ecologie, Bat. Biologie
Uni. Lausanne , CH-1015 Lausanne
Switzerland
Tel: +41 21 692 42 42 Fax: +41 21 692 42 65
Secr:+41 21 692 42 60
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list