<?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: Extract dummies variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Extract-dummies-variable/m-p/604421#M175235</link>
    <description>&lt;P&gt;Welcome &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/299770"&gt;@rxhmx&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you need to compare the list of unique values for 300 variables, from month to month?&lt;/P&gt;
&lt;P&gt;Or the does the list of values stay constant, and only the frequency of each value changes?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In any case, and more importantly, how do you want to convey or to report changes across 100 values for 300 variables?&lt;/P&gt;
&lt;P&gt;Assuming you only compare VAR1 to VAR1, and VAR2 to VAR2, that's still possibly 300,000 comparisons.&lt;/P&gt;
&lt;P&gt;This cannot be read by a human, How should the changes be shown?&lt;/P&gt;</description>
    <pubDate>Fri, 15 Nov 2019 09:39:41 GMT</pubDate>
    <dc:creator>ChrisNZ</dc:creator>
    <dc:date>2019-11-15T09:39:41Z</dc:date>
    <item>
      <title>Extract dummies variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-dummies-variable/m-p/604419#M175234</link>
      <description>&lt;P&gt;Dear all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a project in which I have to check automatically the evolution of some variables each month&amp;nbsp;&lt;/P&gt;&lt;P&gt;For instance, I have to chech the frequency of each modality for a variable in the table n-1 compared to the table n&amp;nbsp;&lt;/P&gt;&lt;P&gt;These variables are dummies and can have until 100 modalities.&amp;nbsp;&lt;/P&gt;&lt;P&gt;The databases are really big and I'm looking for a way to extract from each table the variables with categorical data (there is more than 300 variables) and merge them two by two&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does someone know if it's possible ? I tried to use proc contents but I did'nt help me&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you in advance ! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2019 09:25:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-dummies-variable/m-p/604419#M175234</guid>
      <dc:creator>rxhmx</dc:creator>
      <dc:date>2019-11-15T09:25:27Z</dc:date>
    </item>
    <item>
      <title>Re: Extract dummies variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-dummies-variable/m-p/604421#M175235</link>
      <description>&lt;P&gt;Welcome &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/299770"&gt;@rxhmx&lt;/a&gt;&amp;nbsp;!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you need to compare the list of unique values for 300 variables, from month to month?&lt;/P&gt;
&lt;P&gt;Or the does the list of values stay constant, and only the frequency of each value changes?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In any case, and more importantly, how do you want to convey or to report changes across 100 values for 300 variables?&lt;/P&gt;
&lt;P&gt;Assuming you only compare VAR1 to VAR1, and VAR2 to VAR2, that's still possibly 300,000 comparisons.&lt;/P&gt;
&lt;P&gt;This cannot be read by a human, How should the changes be shown?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2019 09:39:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-dummies-variable/m-p/604421#M175235</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-11-15T09:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: Extract dummies variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-dummies-variable/m-p/604424#M175237</link>
      <description>&lt;P&gt;Hi Chris ! Thank you for your answer&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In these 300 variables there is maybe 15 or 20 categorical variables, the number of values of these 15 variables can increase or decrease.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to compare them two by two using proc freq for instance&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I think the changes can be readable if it only concerns a few values&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't know if it is clear (english is not my native langage)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To sum up I want someting like "For VAR 1 from table 1 the frequency of blue is 20% and for var 1 from table 2 the frequency of "blue" is 21%"&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>Fri, 15 Nov 2019 09:48:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-dummies-variable/m-p/604424#M175237</guid>
      <dc:creator>rxhmx</dc:creator>
      <dc:date>2019-11-15T09:48:31Z</dc:date>
    </item>
    <item>
      <title>Re: Extract dummies variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-dummies-variable/m-p/604427#M175239</link>
      <description>&lt;P&gt;Why not a proc summary on each table and then merge the results and compare.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc summary data=TAB1; 
  class VAR1 VAR2;
  ways 1;
  output out=SUM1;
 run;&lt;/CODE&gt;&lt;/PRE&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>Fri, 15 Nov 2019 11:01:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-dummies-variable/m-p/604427#M175239</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-11-15T11:01:18Z</dc:date>
    </item>
    <item>
      <title>Re: Extract dummies variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-dummies-variable/m-p/604616#M175303</link>
      <description>&lt;P&gt;Or even no merge and proc compare.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2019 20:12:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-dummies-variable/m-p/604616#M175303</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2019-11-15T20:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: Extract dummies variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-dummies-variable/m-p/604617#M175304</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/299770"&gt;@rxhmx&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You write "&lt;EM&gt;The databases are really big&lt;/EM&gt;"&lt;/P&gt;
&lt;P&gt;Can you please quantify "big"?&lt;/P&gt;
&lt;P&gt;What does "database" mean? SAS tables or actually tables in a database like SQL Server or Oracle?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2019 20:20:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-dummies-variable/m-p/604617#M175304</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-11-15T20:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Extract dummies variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Extract-dummies-variable/m-p/604619#M175306</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/299770"&gt;@rxhmx&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Dear all,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a project in which I have to check automatically the evolution of some variables each month&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For instance, I have to chech the frequency of each modality for a variable in the table n-1 compared to the table n&amp;nbsp;&lt;/P&gt;
&lt;P&gt;These variables are dummies and can have until 100 modalities.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The databases are really big and I'm looking for a way to extract from each table the variables with categorical data (there is more than 300 variables) and merge them two by two&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Sure this is possible, I think you would probably need to perform PROC FREQ on each data table, then a macro of some sort to loop through the different variables and compare the results of the PROC FREQ across the two tables. Although first I would investigate if PROC COMPARE does enough to meet your needs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You phrase this problem in terms of "dummies", but if I am understanding you properly, there is no need for dummy variables at all.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2019 20:34:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Extract-dummies-variable/m-p/604619#M175306</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2019-11-15T20:34:47Z</dc:date>
    </item>
  </channel>
</rss>

