BookmarkSubscribeRSS Feed
jjjunyi
Calcite | Level 5

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!


1 REPLY 1
ets_kps
SAS Employee

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



sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1312 views
  • 0 likes
  • 2 in conversation