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


 

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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
  • 895 views
  • 1 like
  • 2 in conversation