BookmarkSubscribeRSS Feed
Justin_Lang
Fluorite | Level 6

Hello, 

 

I'm looking for a way to run multiple unique models with different dependent variables. I tried running the code below, but it doesn't work. Is there a macro I can use, or some alternative code that I can use to run these models? I have roughly 80 models to run and I'm looking for the quickest way to do it all at once. 

 

Proc SurveyReg data=CHMS1234 varmethod=brr;
class active CLC_SEX HHEDU;
model SBP = active CLC_SEX HHEDU / solution clparm df=46;
model DBP = active CLC_SEX HHEDU / solution clparm df=46;
model TC = active CLC_SEX HHEDU / solution clparm df=46;
model HDLc= active CLC_SEX HHEDU / solution clparm df=46;
weight wgt_full;
repweights BSW1-BSW500;
by AgeGroup;
run;

 

Cheers,

Justin

1 REPLY 1
Reeza
Super User

This is likely the most optimal solution:

 

https://blogs.sas.com/content/iml/2017/02/13/run-1000-regressions.html

 


@Justin_Lang wrote:

Hello, 

 

I'm looking for a way to run multiple unique models with different dependent variables. I tried running the code below, but it doesn't work. Is there a macro I can use, or some alternative code that I can use to run these models? I have roughly 80 models to run and I'm looking for the quickest way to do it all at once. 

 

Proc SurveyReg data=CHMS1234 varmethod=brr;
class active CLC_SEX HHEDU;
model SBP = active CLC_SEX HHEDU / solution clparm df=46;
model DBP = active CLC_SEX HHEDU / solution clparm df=46;
model TC = active CLC_SEX HHEDU / solution clparm df=46;
model HDLc= active CLC_SEX HHEDU / solution clparm df=46;
weight wgt_full;
repweights BSW1-BSW500;
by AgeGroup;
run;

 

Cheers,

Justin


 

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!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 674 views
  • 1 like
  • 2 in conversation