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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!

Register now

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