<?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 Re: Looping SAS regreression for two variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Looping-SAS-regreression-for-two-variables/m-p/460886#M284726</link>
    <description>I amusing fractional response model.Avoided that part just to keep the&lt;BR /&gt;things simple...Agree that it is not very prudent to check each possible&lt;BR /&gt;combination&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 08 May 2018 23:04:00 GMT</pubDate>
    <dc:creator>Rajat183</dc:creator>
    <dc:date>2018-05-08T23:04:00Z</dc:date>
    <item>
      <title>Looping SAS regreression for two variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looping-SAS-regreression-for-two-variables/m-p/460795#M284719</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am running a regression where I need to pass two variables at a time and check all the combinations.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have 10 macroeconomic variables and would like to run 45 (10C2) regression.Please suggest some solution by creating a long dataset so that I can leverage 'by' funcitionality and have all the results in one data set.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Rajat&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 18:49:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looping-SAS-regreression-for-two-variables/m-p/460795#M284719</guid>
      <dc:creator>Rajat183</dc:creator>
      <dc:date>2018-05-08T18:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: Looping SAS regreression for two variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looping-SAS-regreression-for-two-variables/m-p/460797#M284720</link>
      <description>&lt;P&gt;&lt;FONT size="3"&gt;See this&lt;/FONT&gt;&lt;/P&gt;
&lt;H1 class="post-title item fn"&gt;&lt;FONT size="3"&gt;&lt;A href="https://blogs.sas.com/content/iml/2017/02/13/run-1000-regressions.html" target="_self"&gt;An easy way to run thousands of regressions in SAS&lt;/A&gt;&lt;/FONT&gt;&lt;/H1&gt;</description>
      <pubDate>Tue, 08 May 2018 18:52:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looping-SAS-regreression-for-two-variables/m-p/460797#M284720</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-05-08T18:52:10Z</dc:date>
    </item>
    <item>
      <title>Re: Looping SAS regreression for two variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looping-SAS-regreression-for-two-variables/m-p/460798#M284721</link>
      <description>&lt;P&gt;This is very popular page but solution is good only for 1 variable&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 18:54:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looping-SAS-regreression-for-two-variables/m-p/460798#M284721</guid>
      <dc:creator>Rajat183</dc:creator>
      <dc:date>2018-05-08T18:54:03Z</dc:date>
    </item>
    <item>
      <title>Re: Looping SAS regreression for two variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looping-SAS-regreression-for-two-variables/m-p/460804#M284722</link>
      <description>&lt;P&gt;Can you show us some example of what your data looks like?&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 19:06:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looping-SAS-regreression-for-two-variables/m-p/460804#M284722</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2018-05-08T19:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Looping SAS regreression for two variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looping-SAS-regreression-for-two-variables/m-p/460810#M284723</link>
      <description>&lt;P&gt;Is something like this what you are looking for?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;data junk;
   set sashelp.class;
   varlist= 'age height weight';
   length firstvar secondvar $ 15;
   do i= 1 to (countw(varlist)-1);
      firstvar= scan(varlist,i);
      do j= (i+1) to countw(varlist);
         secondvar = scan(varlist,j);
         output;
      end;
   end;
run;

proc sort data=junk;
   by firstvar secondvar;
run;&lt;/PRE&gt;
&lt;P&gt;I used a somewhat smaller example set with 3 variables instead of 10.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If your actual variables have names longer than 15 character adjust the length statement to match your longest.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Remember that BY group processing can use more than a single variable, just like the sort.&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 21:15:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looping-SAS-regreression-for-two-variables/m-p/460810#M284723</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-05-08T21:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: Looping SAS regreression for two variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looping-SAS-regreression-for-two-variables/m-p/460831#M284724</link>
      <description>&lt;P&gt;This helped ..Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 20:09:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looping-SAS-regreression-for-two-variables/m-p/460831#M284724</guid>
      <dc:creator>Rajat183</dc:creator>
      <dc:date>2018-05-08T20:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: Looping SAS regreression for two variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looping-SAS-regreression-for-two-variables/m-p/460878#M284725</link>
      <description>&lt;P&gt;Of course, just because you CAN get SAS to do these 45 regressions, that doesn't mean you SHOULD do it this way. There are better solutions than fitting the 45 different models. One of them is Partial Least Squares regression, which can handle all 10 variables in one model and not get badly influenced by collinearity between the variables.&lt;/P&gt;</description>
      <pubDate>Tue, 08 May 2018 22:35:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looping-SAS-regreression-for-two-variables/m-p/460878#M284725</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-05-08T22:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: Looping SAS regreression for two variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looping-SAS-regreression-for-two-variables/m-p/460886#M284726</link>
      <description>I amusing fractional response model.Avoided that part just to keep the&lt;BR /&gt;things simple...Agree that it is not very prudent to check each possible&lt;BR /&gt;combination&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 08 May 2018 23:04:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looping-SAS-regreression-for-two-variables/m-p/460886#M284726</guid>
      <dc:creator>Rajat183</dc:creator>
      <dc:date>2018-05-08T23:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: Looping SAS regreression for two variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Looping-SAS-regreression-for-two-variables/m-p/460948#M284727</link>
      <description>&lt;P&gt;I don't know what a fractional response model is, but any modelling that can be handled by regression can be handled by Partial Least Squares. As I said, PLS will usually fit the model better, and avoids these difficulties of looping throught 45 combinations of variables.&lt;/P&gt;</description>
      <pubDate>Wed, 09 May 2018 10:49:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Looping-SAS-regreression-for-two-variables/m-p/460948#M284727</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-05-09T10:49:45Z</dc:date>
    </item>
  </channel>
</rss>

