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