LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2010, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 21 Jul 2010 10:42:38 -0700
Reply-To:     Jon Matthews <jmatthews7101@YAHOO.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Jon Matthews <jmatthews7101@YAHOO.COM>
Subject:      Weighted Least Squares Question in SAS
Content-Type: text/plain; charset=iso-8859-1

Hi,   I am using SAS to create a weighted least squares regression, and I've run into a question about the coefficient of determination when using weighted least squares regression. Here is some code I wrote: data work.temp; input x y w; cards; 1 1 1 2 2 1 3 4 1 ; run; proc reg data=work.temp; weight w; model y=x; run; quit;   Since the weights are all 1, this is the same as unweighted regression and this gives me an R-squared of .9643.  Note that in my data, the first two observations are perfectly correlated while the third is not.  Now, if I re-weight the last observation to place less weight on it since it's not perfectly corrected with the others and rerun the weighted least squares regression, I get a lower R-squared:     input x y w; cards; 1 1 1 2 2 1 3 4 .1 ; run; proc reg data=work.temp; weight w; model y=x; run; quit;   R-squared now equals .9391.   This does not seem intuitive.  Since I'm now underweighting the only non-perfectly correlated observation, shouldn't R-squared improve or am I missing something?   Thanks for any insight.


Back to: Top of message | Previous page | Main SAS-L page