BookmarkSubscribeRSS Feed
Golf
Quartz | Level 8

Hello,

    Based on the result of the proc reg below.

proc reg   data = example outest=parameters; 
model  y =  A B C D E F;
run;

How can I use SAS to calculate  Obs*Rsquare, instead of using calculator?  

Thank you 

 

 

 

 

4 REPLIES 4
ed_sas_member
Meteorite | Level 14

Hi @Golf 

 

PROC REG assigns a name to each table it creates in the results.

You can retrieve them through the ODS OUTPUT: https://documentation.sas.com/?docsetId=statug&docsetTarget=statug_reg_details52.htm&docsetVersion=1...

 

-> To retrieve the value of the R square (i.e. the % of variability explained by the model), the table name is FITSTATISTICS. Here is the code to be submitted before the PROC REG:

ods output fitstatistics = _fitstatistics;

What do yo mean by "Obs*Rsquare"?

Golf
Quartz | Level 8
Dear Ed,
Thanks for you response.
Obs*Rsquare is the number of observation multiply to R-square.
If I use "ods output fitstatistics = _fitstatistics", how can I know which symbols are used for the number of observation and the value of R-Square?
Best,
PaigeMiller
Diamond | Level 26

You probably need

 

ods output fitstatistics=fitstatistics nobs=nobs;

as the number of observations used in the regression is in the NOBS table.

 

how can I know which symbols are used for the number of observation and the value of R-Square?

You can know which variables contain the values you want by actually looking at these data sets that are created.

 

I'm skeptical that Obs*Rsquare has any particular meaning in a regression; why do you want this value?

--
Paige Miller
Golf
Quartz | Level 8
I need obs*R-square to test overidentification based on the method of Sargant test.
Thanks.

SAS INNOVATE 2024

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 4 replies
  • 425 views
  • 0 likes
  • 3 in conversation