<?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: Help with calculating the scores in SAS Health and Life Sciences</title>
    <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Help-with-calculating-the-scores/m-p/41900#M1285</link>
    <description>That seems working. Thanks a lot.</description>
    <pubDate>Wed, 01 Dec 2010 16:35:29 GMT</pubDate>
    <dc:creator>deleted_user</dc:creator>
    <dc:date>2010-12-01T16:35:29Z</dc:date>
    <item>
      <title>Help with calculating the scores</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Help-with-calculating-the-scores/m-p/41898#M1283</link>
      <description>I have a situation given below. I want to calculate the scores for each row from its Value. If visit '0' is missing for a sample like in case of Sample B, then scores for this sample should be "".I'm just learning SAS. Someone guide me on this. &lt;BR /&gt;
&lt;BR /&gt;
Sample  visit  Value   Score&lt;BR /&gt;
A            0        1.2           &lt;BR /&gt;
A            2        0.8&lt;BR /&gt;
A            3        1.6&lt;BR /&gt;
B            2        0.3&lt;BR /&gt;
B            3        1.4&lt;BR /&gt;
C            0        1.7&lt;BR /&gt;
C            2        1.9&lt;BR /&gt;
C            3        0.8&lt;BR /&gt;
&lt;BR /&gt;
Score= (Value at Visit 0-Value at current visit)/value at visit 0&lt;BR /&gt;
&lt;BR /&gt;
Can Someone help me with this?&lt;BR /&gt;
&lt;BR /&gt;
Thanks in Advance!

Message was edited by: kireeti</description>
      <pubDate>Tue, 30 Nov 2010 21:38:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Help-with-calculating-the-scores/m-p/41898#M1283</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-11-30T21:38:04Z</dc:date>
    </item>
    <item>
      <title>Re: Help with calculating the scores</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Help-with-calculating-the-scores/m-p/41899#M1284</link>
      <description>See if this is close to what you are looking for.  There are alternatives depending on data set size and other potential constraints.&lt;BR /&gt;
[pre]data visitdata;&lt;BR /&gt;
input Sample $ visit Value;&lt;BR /&gt;
datalines;&lt;BR /&gt;
A 0 1.2 &lt;BR /&gt;
A 2 0.8&lt;BR /&gt;
A 3 1.6&lt;BR /&gt;
B 2 0.3&lt;BR /&gt;
B 3 1.4&lt;BR /&gt;
C 0 1.7&lt;BR /&gt;
C 2 1.9&lt;BR /&gt;
C 3 0.8&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
proc sort data=visitdata;&lt;BR /&gt;
   by sample visit;&lt;BR /&gt;
   run;&lt;BR /&gt;
&lt;BR /&gt;
data scores;&lt;BR /&gt;
   set visitdata;&lt;BR /&gt;
   by sample visit;&lt;BR /&gt;
   retain initval .;&lt;BR /&gt;
   if first.sample then do;&lt;BR /&gt;
      if visit = 0 then initval=value;&lt;BR /&gt;
      else initval=.;&lt;BR /&gt;
   end;&lt;BR /&gt;
   *Score= (Value at Visit 0-Value at current visit)/value at visit 0;&lt;BR /&gt;
   if initval ne . then score = (initval - value)/initval;&lt;BR /&gt;
   run;&lt;BR /&gt;
&lt;BR /&gt;
proc print data=scores;&lt;BR /&gt;
   run;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Tue, 30 Nov 2010 23:59:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Help-with-calculating-the-scores/m-p/41899#M1284</guid>
      <dc:creator>ArtC</dc:creator>
      <dc:date>2010-11-30T23:59:37Z</dc:date>
    </item>
    <item>
      <title>Re: Help with calculating the scores</title>
      <link>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Help-with-calculating-the-scores/m-p/41900#M1285</link>
      <description>That seems working. Thanks a lot.</description>
      <pubDate>Wed, 01 Dec 2010 16:35:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Health-and-Life-Sciences/Help-with-calculating-the-scores/m-p/41900#M1285</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2010-12-01T16:35:29Z</dc:date>
    </item>
  </channel>
</rss>

