BookmarkSubscribeRSS Feed
momi
Obsidian | Level 7

Hi,

 

Is there any way that I can create an output dataset that contains an adjusted R square (adjrsq) in Proc surveyreg?

 

I can do this in proc reg by setting,

 

proc reg data = dataset
outest = test_outputdataset
adjrsq

;

 

model outcome = adjusters / stb ;

;

run;

 

A test_outputdataset contains a value of adjusted R square.   Can I so the same thing for Proc Surveyreg?

 

Thank you,

 

2 REPLIES 2
SteveDenham
Jade | Level 19

Include ADJRSQ as an option on your model statement, and then use ODS to get the fit statistics into a dataset.

 

ods output fitstatistics=fitstatistics;

proc surveyreg data=yourdata;

...

model depvar=indepvar1 indepvar2 <etc.>/ADJRSQ;

run;

 

This ought to give you what you need.

 

Steve Denham

ballardw
Super User

You can use ODS OUTPUT tablename= yourdatasetname; to create data sets from values that appear in output tables.

 

The procedure documentation will show the various table names available or use ODS TRACE.

The likely table would be FitStatistics but you would need to have ADJRSQ on the model statement.

 

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

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

View all other training opportunities.

Discussion stats
  • 2 replies
  • 1906 views
  • 2 likes
  • 3 in conversation