<?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: How to find which variable values are different between duplicates by subjid in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-which-variable-values-are-different-between/m-p/527730#M143936</link>
    <description>&lt;P&gt;Thank you very much for your time.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My question was, the data set that i am working is subject level data set which should have only one record for 'id'.&amp;nbsp; In my output there should be only three records. But when i ran '&lt;SPAN&gt;proc sort data=one out=two nodupkey;by _all_;run; ' i am able to remove only one record which is&amp;nbsp;for id=3.&amp;nbsp; &amp;nbsp;Now i need to find which variables have different values for id=1 and id=2. In the below example, for id=1, the variable 'e' has different values and for id=2, the variable 'a' and 'e' has different values. So i want to output something like below so i can quickly see which variables have different values&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;output needed&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;id&amp;nbsp; &amp;nbsp; &amp;nbsp;a&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;e&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2,3&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp;b,c&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2,3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data one;
input id a $ b $ c $ d e;
datalines;
1 a b c 1 2
1 a b c 1 3
2 b b c 1 2
2 c b c 1 3
3 a b c 1 2
3 a b c 1 2;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 16 Jan 2019 15:12:32 GMT</pubDate>
    <dc:creator>knveraraju91</dc:creator>
    <dc:date>2019-01-16T15:12:32Z</dc:date>
    <item>
      <title>How to find which variable values are different between duplicates by subjid</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-which-variable-values-are-different-between/m-p/527640#M143896</link>
      <description>&lt;P&gt;Dear,&lt;/P&gt;
&lt;P&gt;I would like to know if i can find a way to find the the variables with different vales.&amp;nbsp; In my data set there are duplicates by 'id' variable vales but other variables values are different. I used proc sort data=one out=two nodupkey;by _all_;run;&amp;nbsp; &amp;nbsp;With this step one of the duplicate for id=3 removed.&amp;nbsp; Now I need to know which variables have different values for other subjects. My data set has close to 200 variables. Please suggest. Thank you&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data one;
input id a $ b $ c $ d e;
datalines;
1 a b c 1 2
1 a b c 1 3
2 b b c 1 2
2 c b c 1 3&lt;BR /&gt;3 a b c 1 2&lt;BR /&gt;3 a b c 1 2&lt;BR /&gt;&lt;/CODE&gt;&lt;CODE class=" language-sas"&gt;;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;'&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 05:55:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-which-variable-values-are-different-between/m-p/527640#M143896</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2019-01-16T05:55:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to find which variable values are different between duplicates by subjid</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-which-variable-values-are-different-between/m-p/527641#M143897</link>
      <description>&lt;P&gt;What should the output be for your example data?&lt;/P&gt;</description>
      <pubDate>Wed, 16 Jan 2019 06:02:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-which-variable-values-are-different-between/m-p/527641#M143897</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2019-01-16T06:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to find which variable values are different between duplicates by subjid</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-which-variable-values-are-different-between/m-p/527730#M143936</link>
      <description>&lt;P&gt;Thank you very much for your time.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My question was, the data set that i am working is subject level data set which should have only one record for 'id'.&amp;nbsp; In my output there should be only three records. But when i ran '&lt;SPAN&gt;proc sort data=one out=two nodupkey;by _all_;run; ' i am able to remove only one record which is&amp;nbsp;for id=3.&amp;nbsp; &amp;nbsp;Now i need to find which variables have different values for id=1 and id=2. In the below example, for id=1, the variable 'e' has different values and for id=2, the variable 'a' and 'e' has different values. So i want to output something like below so i can quickly see which variables have different values&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;output needed&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;id&amp;nbsp; &amp;nbsp; &amp;nbsp;a&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;e&lt;/P&gt;
&lt;P&gt;1&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2,3&lt;/P&gt;
&lt;P&gt;2&amp;nbsp; &amp;nbsp; &amp;nbsp;b,c&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2,3&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data one;
input id a $ b $ c $ d e;
datalines;
1 a b c 1 2
1 a b c 1 3
2 b b c 1 2
2 c b c 1 3
3 a b c 1 2
3 a b c 1 2;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 16 Jan 2019 15:12:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-which-variable-values-are-different-between/m-p/527730#M143936</guid>
      <dc:creator>knveraraju91</dc:creator>
      <dc:date>2019-01-16T15:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to find which variable values are different between duplicates by subjid</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-find-which-variable-values-are-different-between/m-p/527751#M143953</link>
      <description>Does each ID have only two records each, or can there be multiple records per ID? Is there a limit to how many there can be?</description>
      <pubDate>Wed, 16 Jan 2019 16:01:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-find-which-variable-values-are-different-between/m-p/527751#M143953</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-16T16:01:07Z</dc:date>
    </item>
  </channel>
</rss>

