Help using Base SAS procedures

Regress two models in one proc reg procedure and output to two different files

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 122
Accepted Solution

Regress two models in one proc reg procedure and output to two different files

Hi,

I have a dataset including independent variables x1-x5, and dependent variable y. I want to do two regressions, y on x1, x2, and x3, and the other regression with y on x4 and x5. Can I use one proc reg command to do two regressions and output to two different files. Something like

proc reg data=file outest=model1 model2;

     model y=x1 x2 x3;

     model y=x4 x5;

run;

Also, is it easy to output estimates to one data file?

Thanks.


Accepted Solutions
Solution
‎07-17-2013 01:18 PM
Trusted Advisor
Posts: 2,114

Re: Regress two models in one proc reg procedure and output to two different files

Sean,

See the documentation.

SAS/STAT(R) 9.22 User's Guide

REG outputs just one file with a model indicator variable.  You can break it apart in another step.

View solution in original post


All Replies
Solution
‎07-17-2013 01:18 PM
Trusted Advisor
Posts: 2,114

Re: Regress two models in one proc reg procedure and output to two different files

Sean,

See the documentation.

SAS/STAT(R) 9.22 User's Guide

REG outputs just one file with a model indicator variable.  You can break it apart in another step.

Frequent Contributor
Posts: 122

Re: Regress two models in one proc reg procedure and output to two different files

Thanks.

🔒 This topic is solved and locked.

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

Discussion stats
  • 2 replies
  • 413 views
  • 0 likes
  • 2 in conversation