s-news
[Top] [All Lists]

Re: [S] Different R^2s?

To: Brian Beckage <bb2@duke.edu>
Subject: Re: [S] Different R^2s?
From: Prof Brian D Ripley <ripley@stats.ox.ac.uk>
Date: Thu, 29 Apr 1999 23:07:13 +0100 (BST)
Cc: s-news@wubios.wustl.edu
In-reply-to: <Pine.SOL.3.91.990429151923.13606B-100000@godzilla5.acpub.duke.edu>
Sender: owner-s-news@wubios.wustl.edu
On Thu, 29 Apr 1999, Brian  Beckage wrote:

> 
> Hello,
> 
>       I noticed that when I fit the following two models I get 
> different R^2's when (I think) they should be the same.
> 
> model1<-lm(log(price)~date+mileage+date:mileage+mod450+mod380+
>       mod280+mod200,data=merc.design)
> 
> model2<-lm(log(price)~-1+date+mileage+date:mileage+mod500+mod450+mod380+
>       mod280+mod200,data=merc.design)
> 
> summary(model1) yields an R^2 of 0.9395 while summary(model2) yields an 
> R^2 of 0.9999.  I'm using Splus3.4.

You may think they should be the same, but S-PLUS does not. I agree.
The difference is the null model: this has an intercept in the first
case and not the second. Think of R^2 as

        RSS(fitted model) / RSS(null model)

If you think of it as a squared correlation it only makes sense if
you remove means iff there is a mean in the model.

This has been discussed here quite regularly: you will find much
longer discussions in the archives.

-- 
Brian D. Ripley,                  ripley@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

-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>