Skip to content
Back to formatted view

Raw Message

Message-ID: <20081202131705.46799297@berwin-nus1>
Date: 2008-12-02T05:17:05Z
From: Berwin A Turlach
Subject: r2 for lm() with zero intercept
In-Reply-To: <914D7AFE471D6E46AFECD987B8F24A3B19852DF4@EXVIC-MBX02.nexus.csiro.au>

G'day Glenn,

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

> I'm a little confused about the R2 and adjusted R2 values reported by
> lm() when I try to fix an intercept. When using +0 or -1 in the
> formula I have found that the standard error generally increases (as
> I would expect) but the R2 also increases (which seems counter
> intuitive). 

?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.


> I do realise that many will say I shouldn't be fixing the intercept
> anyway 

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