Desktop productivity for business analysts and programmers

Multiple regression

Accepted Solution Solved
Reply
Contributor
Posts: 20
Accepted Solution

Multiple regression

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


Accepted Solutions
Solution
‎03-27-2018 05:19 PM
Super User
Posts: 8,218

Re: Multiple regression

Posted in reply to PaigeMiller

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

 

Art, CEO, AnalystFinder.com

 

View solution in original post


All Replies
Respected Advisor
Posts: 3,281

Re: Multiple regression

ods output fitstatistics = fitstatistics;
proc reg ... 

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

--
Paige Miller
Super User
Posts: 8,218

Re: Multiple regression

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

 

Respected Advisor
Posts: 3,281

Re: Multiple regression

But then you have to parse the OUTEST file.

--
Paige Miller
Solution
‎03-27-2018 05:19 PM
Super User
Posts: 8,218

Re: Multiple regression

Posted in reply to PaigeMiller

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

 

Art, CEO, AnalystFinder.com

 

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 4 replies
  • 238 views
  • 4 likes
  • 3 in conversation