BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Max05
Obsidian | Level 7

Hello, 

I ran the following multiple linear regression: 

 

proc reg data=regress1 outest=regress2;
model PERF = MKT SMB HML;
by id;
run;

 

and I would like to export the R² from all the regressions (for each ID) in an excel file. 

However, even with 'outest', I only obtain RMSE and intercept for each ID. 

 

Thanks a lot in advance for your help. 

 

Max

1 ACCEPTED SOLUTION

Accepted Solutions
art297
Opal | Level 21

@PaigeMiller: I think it results in just one line per by group

 

Art, CEO, AnalystFinder.com

 

View solution in original post

4 REPLIES 4
PaigeMiller
Diamond | Level 26
ods output fitstatistics = fitstatistics;
proc reg ... 

Will create a data set named fitstatistics which contains the R-squared values. 

--
Paige Miller
art297
Opal | Level 21

Alternatively, if you don't want to parse the ods file, just use the EDF option. e.g.:

proc reg data=class edf outest=regress3;
  model age = height weight;
  by sex;
run;

Art, CEO, AnalystFinder.com

 

PaigeMiller
Diamond | Level 26

But then you have to parse the OUTEST file.

--
Paige Miller
art297
Opal | Level 21

@PaigeMiller: I think it results in just one line per by group

 

Art, CEO, AnalystFinder.com

 

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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
  • 4 replies
  • 950 views
  • 4 likes
  • 3 in conversation