Hi all,
I would like to include more than one arguments in each parameter of following macro. For example, in the position of ys to have more than one ys and the parameter xs to have more than one x. Please see the code below
%macro multireg(ys=, yhats= ,xs=);
proc robustreg data=want outest=est noprint;
model &ys = &xs lnnum_lu ;
output out=want
p= &yhats;
quit;
%mend multireg;
%multireg(ys=bhared_3y , yhats= bhared_3yhatm1, xs=lupe);
I want to run a code for multiple regressions e.g
%multireg(ys=bhared_3y bhared_2y bhared_1y, yhats= bhared_3yhatm1 bhared_2yhatm1 bhared_1yhatm1, xs=lupe x1 x2);
Thank you very much in advance
Regards
George
Couldn't you just call the macro multiple times passing in different parameter values?
Show the code you want to generate without macro variables that uses 2 or more response variables (Ys) that generates desired output.
Then we can help you.
Agree, show the generated code you would want from your macro call where you past the lists. Would you want 3 PROC steps? 3 model statements? 9 proc steps?...
April 27 – 30 | Gaylord Texan | Grapevine, Texas
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!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.