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?...
Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.
Register today!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.