<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Macro in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/769816#M244128</link>
    <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to include more than one arguments in each parameter of&amp;nbsp; 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&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
%macro multireg(ys=, yhats= ,xs=);
       
proc robustreg data=want outest=est noprint;
      model &amp;amp;ys = &amp;amp;xs  lnnum_lu ;
   output out=want
      p= &amp;amp;yhats;
quit;

%mend multireg;


%multireg(ys=bhared_3y , yhats= bhared_3yhatm1, xs=lupe);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to run a code for multiple regressions e.g&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;%multireg(ys=bhared_3y  bhared_2y bhared_1y, yhats= bhared_3yhatm1 bhared_2yhatm1 bhared_1yhatm1, xs=lupe x1 x2);&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much in advance&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;George&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 23 Sep 2021 08:31:06 GMT</pubDate>
    <dc:creator>georgel</dc:creator>
    <dc:date>2021-09-23T08:31:06Z</dc:date>
    <item>
      <title>Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/769816#M244128</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would like to include more than one arguments in each parameter of&amp;nbsp; 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&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
%macro multireg(ys=, yhats= ,xs=);
       
proc robustreg data=want outest=est noprint;
      model &amp;amp;ys = &amp;amp;xs  lnnum_lu ;
   output out=want
      p= &amp;amp;yhats;
quit;

%mend multireg;


%multireg(ys=bhared_3y , yhats= bhared_3yhatm1, xs=lupe);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to run a code for multiple regressions e.g&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;%multireg(ys=bhared_3y  bhared_2y bhared_1y, yhats= bhared_3yhatm1 bhared_2yhatm1 bhared_1yhatm1, xs=lupe x1 x2);&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much in advance&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;George&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 08:31:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/769816#M244128</guid>
      <dc:creator>georgel</dc:creator>
      <dc:date>2021-09-23T08:31:06Z</dc:date>
    </item>
    <item>
      <title>Re: Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/769856#M244141</link>
      <description>&lt;P&gt;Couldn't you just call the macro multiple times passing in different parameter values?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 09:51:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/769856#M244141</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2021-09-23T09:51:57Z</dc:date>
    </item>
    <item>
      <title>Re: Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/769953#M244203</link>
      <description>&lt;P&gt;Show the code you want to generate without macro variables that uses 2 or more response variables (Ys) that generates desired output.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then we can help you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 15:30:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/769953#M244203</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-09-23T15:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: Macro</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/769959#M244208</link>
      <description>&lt;P&gt;Agree, show the generated code you would want from your macro call where you past the lists.&amp;nbsp; Would you want 3 PROC steps? 3 model statements? 9 proc steps?...&lt;/P&gt;</description>
      <pubDate>Thu, 23 Sep 2021 15:58:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Macro/m-p/769959#M244208</guid>
      <dc:creator>Quentin</dc:creator>
      <dc:date>2021-09-23T15:58:57Z</dc:date>
    </item>
  </channel>
</rss>

