Programming the statistical procedures from SAS

In proc autoreg, how to calculate the Redefined R square, with noint?

Reply
Occasional Contributor
Posts: 15

In proc autoreg, how to calculate the Redefined R square, with noint?

Hi everyone, I am looking for a detailed description about how to calculate the redefined R square, in proc autoreg procedure, with noint statement. I searched a lot online and most of answers are about simple reg.

Great thanks!


SAS Employee
Posts: 89

Re: In proc autoreg, how to calculate the Redefined R square, with noint?

Thank you for your question. Here is an answer from technical support detailing what happens when NOINT is chosen. You can see the creative use of MACRO at the bottom which would let you define your R^2 in whatever form you would like.  -Ken

"
With NOINT option, PROC AUTOREG does the same as PROC REG which uses uncorrected total sum of squares instead of corrected total sum of squares. Here is a usage note discussing this redefined rsquare:

http://support.sas.com/kb/22/632.html

Here is an example reproducing the rsquare with NOINT option:

data a ;

  do i = 1 to 100 ;

x = normal(1) ;

y = 3*x + rannor(213);

output;

  end;

run;

proc means data= a;

var y ;

output out = outm mean = my css = ssc uss = ssu;

run;

ods output fitsummary =fits(where =(Label1 = 'SSE') keep = Label1 cValue1);

proc autoreg data =a ;

model y = x/noint ;

run;

proc print data = fits ; run;

data null ;

set fits;

set outm;

call symput('sse',cValue1);

call symput('ssc',ssc);

call symput('ssu',ssu);

run;

data comp ;

rsq_noint= 1-&sse/&ssu ;

run;

proc print data= comp; run;

I hope that helps."



Ask a Question
Discussion stats
  • 1 reply
  • 193 views
  • 0 likes
  • 2 in conversation