Date: Thu, 11 Jul 1996 20:46:30 GMT
Reply-To: Dean Nelson <denelson@FACSTAFF.WISC.EDU>
Sender: "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From: Dean Nelson <denelson@FACSTAFF.WISC.EDU>
Subject: Re: trying to get R-squared to 9 decimal places
In article <email@example.com>, firstname.lastname@example.org says...
>Dean Nelson (email@example.com) wrote:
>:Does anyone know how to get R-squared from an OLS model to 9 decimal places?
>your post piqued my interest. just as a matter of curiosity, why would
>you want the ninth decimal place of an R-square value?
Evidently, the student with the problem will be calculating some statistic
based on the value of rsquare, and part of the calculation involves either
dividing or multiplying by 280,000, I forget which.
Another problem has cropped up in this solution. The model he is using has
68 independent variables. PROC RSQUARE generates all possible regressions...
(pause)...I think you are beginning to see the problem. Anyway, I tried to go
back to the documentation and found that the procedure isn't documented, at
least not in the latest manuals (I just happened to be thumbing through a
version 5 manual when I first came across it). After trying to track down
what happened to it, I finally decided to go back to PROC REG and see if I
could get what I needed there. Here is my quick and dirty solution:
libname dir 'c:\public';
proc reg data=dir.health;
model weight=age height;
output out=reg r=resids;
proc means data=dir.health noprint;
output out=wmean var=totvar;
proc means data=reg noprint;
output out=rmean var=resvar;
merge wmean rmean;
put rsquare 12.9;