<?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 Outputting results from log for LEXCOMB permutation in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Outputting-results-from-log-for-LEXCOMB-permutation/m-p/918856#M45615</link>
    <description>&lt;P&gt;Here's my code:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;%put ParamList = &amp;amp;ParamList; 
data testing;
   array x[5] $10 (&amp;amp;ParamList);
   n=dim(x);
   k=2;
   ncomb=comb(n,k);
   do j=1 to ncomb+1
      rc=lexCOMB(j, k, of x[*]);
       if rc&amp;lt;0 then delete;
	   put j 5. +2 x1-x2;
	   output;
   end;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;where&amp;nbsp;ParamList = "1-White" "2-Black" "3-Hispanic" "4-Asian" "5-Other"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code outputs the following in the log:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1 1-White 2-Black&lt;BR /&gt;2 1-White 3-Hispanic&lt;BR /&gt;3 1-White 4-Asian&lt;BR /&gt;4 1-White 5-Other&lt;BR /&gt;5 2-Black 3-Hispanic&lt;BR /&gt;6 2-Black 4-Asian&lt;BR /&gt;7 2-Black 5-Other&lt;BR /&gt;8 3-Hispanic 4-Asian&lt;BR /&gt;9 3-Hispanic 5-Other&lt;BR /&gt;10 4-Asian 5-Other&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I save these results in a SAS file? Thanks.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 04 Mar 2024 17:55:32 GMT</pubDate>
    <dc:creator>nd</dc:creator>
    <dc:date>2024-03-04T17:55:32Z</dc:date>
    <item>
      <title>Outputting results from log for LEXCOMB permutation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Outputting-results-from-log-for-LEXCOMB-permutation/m-p/918856#M45615</link>
      <description>&lt;P&gt;Here's my code:&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;%put ParamList = &amp;amp;ParamList; 
data testing;
   array x[5] $10 (&amp;amp;ParamList);
   n=dim(x);
   k=2;
   ncomb=comb(n,k);
   do j=1 to ncomb+1
      rc=lexCOMB(j, k, of x[*]);
       if rc&amp;lt;0 then delete;
	   put j 5. +2 x1-x2;
	   output;
   end;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;where&amp;nbsp;ParamList = "1-White" "2-Black" "3-Hispanic" "4-Asian" "5-Other"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The code outputs the following in the log:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1 1-White 2-Black&lt;BR /&gt;2 1-White 3-Hispanic&lt;BR /&gt;3 1-White 4-Asian&lt;BR /&gt;4 1-White 5-Other&lt;BR /&gt;5 2-Black 3-Hispanic&lt;BR /&gt;6 2-Black 4-Asian&lt;BR /&gt;7 2-Black 5-Other&lt;BR /&gt;8 3-Hispanic 4-Asian&lt;BR /&gt;9 3-Hispanic 5-Other&lt;BR /&gt;10 4-Asian 5-Other&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I save these results in a SAS file? Thanks.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 17:55:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Outputting-results-from-log-for-LEXCOMB-permutation/m-p/918856#M45615</guid>
      <dc:creator>nd</dc:creator>
      <dc:date>2024-03-04T17:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: Outputting results from log for LEXCOMB permutation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Outputting-results-from-log-for-LEXCOMB-permutation/m-p/918858#M45616</link>
      <description>&lt;P&gt;Did you look at the TESTING data set created?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The OUTPUT statement tells SAS to write the variables to the data set when encountered.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you compare the values of the X1 and X2 variables with your LOG output they should match.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;HOWEVER, your code as posted is missing a semicolon at the end of the&lt;/P&gt;
&lt;PRE&gt;  do j=1 to ncomb+1&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 18:16:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Outputting-results-from-log-for-LEXCOMB-permutation/m-p/918858#M45616</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-03-04T18:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: Outputting results from log for LEXCOMB permutation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Outputting-results-from-log-for-LEXCOMB-permutation/m-p/918877#M45618</link>
      <description>&lt;P&gt;The missing semicolon is a typo, my saved code has it.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Attached is the TESTING dataset. What I want is one column with the results "1-White 2-Black", "1-White 3-Hispanic," etc. Thanks.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 19:27:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Outputting-results-from-log-for-LEXCOMB-permutation/m-p/918877#M45618</guid>
      <dc:creator>nd</dc:creator>
      <dc:date>2024-03-04T19:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: Outputting results from log for LEXCOMB permutation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Outputting-results-from-log-for-LEXCOMB-permutation/m-p/918902#M45622</link>
      <description>&lt;P&gt;If you want a new variable in the data set then add:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Newvar = catx(' ',x1,x2);&lt;/PRE&gt;
&lt;P&gt;before the output statement.&lt;/P&gt;</description>
      <pubDate>Mon, 04 Mar 2024 21:55:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Outputting-results-from-log-for-LEXCOMB-permutation/m-p/918902#M45622</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2024-03-04T21:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: Outputting results from log for LEXCOMB permutation</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Outputting-results-from-log-for-LEXCOMB-permutation/m-p/918977#M45628</link>
      <description>&lt;P&gt;Thank you!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 14:51:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Outputting-results-from-log-for-LEXCOMB-permutation/m-p/918977#M45628</guid>
      <dc:creator>nd</dc:creator>
      <dc:date>2024-03-05T14:51:54Z</dc:date>
    </item>
  </channel>
</rss>

