Skip to content
Prev 163522 / 398506 Next

r2 for lm() with zero intercept

G'day Glenn,

On Tue, 2 Dec 2008 12:53:44 +1100
<Glenn.Newnham at csiro.au> wrote:

            
?summary.lm

In particular the part:

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.
Quite true; accept if there are very good reasons.  I have seen
intercept through the origin being misused to obtain a large R^2 and
significant coefficient when there were none.

Cheers,

	Berwin

=========================== Full address =============================
Berwin A Turlach                            Tel.: +65 6516 4416 (secr)
Dept of Statistics and Applied Probability        +65 6516 6650 (self)
Faculty of Science                          FAX : +65 6872 3919       
National University of Singapore     
6 Science Drive 2, Blk S16, Level 7          e-mail: statba at nus.edu.sg
Singapore 117546                    http://www.stat.nus.edu.sg/~statba