<?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: Data Format/Coding in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Data-Format-Coding/m-p/334534#M75560</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Yes I can have missing values, and there is also the possibility of a student having for example a score of 3 in all subjects, which in this case the maximum will be 3.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Francis&lt;/P&gt;</description>
    <pubDate>Tue, 21 Feb 2017 02:27:11 GMT</pubDate>
    <dc:creator>nhyira</dc:creator>
    <dc:date>2017-02-21T02:27:11Z</dc:date>
    <item>
      <title>Data Format/Coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Format-Coding/m-p/334524#M75555</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I need someone to help me with recoding my data.&lt;/P&gt;&lt;P&gt;I have 4 variables (MAT, BIO, PHY, CHE). Each of the variable has students scores from 1 - 9, with 9 being the worst score. For example a student in my dataset has a score of 2 in MAT, 3 in BIO, 4 in PHY and 1 in CHE.&lt;/P&gt;&lt;P&gt;What I want to do is create an aggregate variable from the four subjects using the three best grades. In this example, the three best scores are MAT (2), BIO (3) and CHE (1).&lt;/P&gt;&lt;P&gt;Thus, the new variable, which will be called Aggregate Varaible will &amp;nbsp;AGGREG_VAR = (2+3+1) = 6.&lt;/P&gt;&lt;P&gt;So the score for this student for AGGREG_VAR = 6.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PLEASE I NEED HELP IMPLEMENTING THIS IS SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;THANK YOU.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;FRANCIS&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 01:55:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Format-Coding/m-p/334524#M75555</guid>
      <dc:creator>nhyira</dc:creator>
      <dc:date>2017-02-21T01:55:39Z</dc:date>
    </item>
    <item>
      <title>Re: Data Format/Coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Format-Coding/m-p/334526#M75556</link>
      <description>&lt;P&gt;Like this?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data HAVE;
  MAT=4 ;BIO=3; PHY=2 ;CHE=1;
  AGGREG_VAR =sum( MAT,BIO,PHY,CHE)-max( MAT,BIO,PHY,CHE);
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;AGGREG_VAR=6&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 02:03:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Format-Coding/m-p/334526#M75556</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2017-02-21T02:03:16Z</dc:date>
    </item>
    <item>
      <title>Re: Data Format/Coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Format-Coding/m-p/334531#M75558</link>
      <description>&lt;P&gt;Can you have missing values?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 02:18:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Format-Coding/m-p/334531#M75558</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-02-21T02:18:59Z</dc:date>
    </item>
    <item>
      <title>Re: Data Format/Coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Format-Coding/m-p/334533#M75559</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;  AGGREG_VAR =sum(MAT,BIO,PHY,CHE)-(nmiss(MAT,BIO,PHY,CHE)=0)*max(MAT,BIO,PHY,CHE);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;if missing values can exist. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 02:25:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Format-Coding/m-p/334533#M75559</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2017-02-21T02:25:29Z</dc:date>
    </item>
    <item>
      <title>Re: Data Format/Coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Format-Coding/m-p/334534#M75560</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Yes I can have missing values, and there is also the possibility of a student having for example a score of 3 in all subjects, which in this case the maximum will be 3.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Francis&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 02:27:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Format-Coding/m-p/334534#M75560</guid>
      <dc:creator>nhyira</dc:creator>
      <dc:date>2017-02-21T02:27:11Z</dc:date>
    </item>
    <item>
      <title>Re: Data Format/Coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Format-Coding/m-p/334536#M75561</link>
      <description>&lt;P&gt;So a student with two scores would have a lower aggregate than a student with all 4 scores.&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16961"&gt;@ChrisNZ&lt;/a&gt;&amp;nbsp;solution accounts for missing values. If a student who has two missing values is the same as a student who has scores for all 4 then this is fine.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a methodological consideration, not an issue with the code.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 02:30:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Format-Coding/m-p/334536#M75561</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-02-21T02:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: Data Format/Coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Format-Coding/m-p/334539#M75562</link>
      <description>Hi ChrisNZ,&lt;BR /&gt;You're are amazing, and a savior! Thank you. Thank you!!&lt;BR /&gt;Francis</description>
      <pubDate>Tue, 21 Feb 2017 02:35:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Format-Coding/m-p/334539#M75562</guid>
      <dc:creator>nhyira</dc:creator>
      <dc:date>2017-02-21T02:35:59Z</dc:date>
    </item>
    <item>
      <title>Re: Data Format/Coding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Data-Format-Coding/m-p/334550#M75568</link>
      <description>&lt;P&gt;You're welcome. Don't forget to finalise the thread by setting the "solution found" flag.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Feb 2017 04:00:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Data-Format-Coding/m-p/334550#M75568</guid>
      <dc:creator>ChrisNZ</dc:creator>
      <dc:date>2017-02-21T04:00:32Z</dc:date>
    </item>
  </channel>
</rss>

