<?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 rule for each set of variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Help-with-rule-for-each-set-of-variables/m-p/97771#M290512</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have more than 2 rows of data? Is the same ratio to be calculated between each pair of input rows? Would row 4 in output be the 3rd input row and row 5 the ratio of 2nd and 3rd input rows or rows 4 and 5 be input rows 3 and 4 with output row 6 the ratio?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 Sep 2013 15:37:09 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2013-09-30T15:37:09Z</dc:date>
    <item>
      <title>Help with rule for each set of variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-rule-for-each-set-of-variables/m-p/97768#M290509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;I have a data of a 3 set of variable a1-a3 b1-b3 c1-c3.&lt;/P&gt;&lt;P&gt;For a1-a3, I want to calculate a ratio of value*2.0/lag(value)&lt;/P&gt;&lt;P&gt;For b1-b3, I want to calculate a ratio of value*1.0/lag(value)&lt;/P&gt;&lt;P&gt;For c1-c3, I want to calculate a ratio of value*0.5/lag(value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't know how to set condition based on variable name.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is very much appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;HHC&lt;/P&gt;&lt;P&gt;data have;&lt;/P&gt;&lt;P&gt;input id a1 a2 a3 b1 b2 b3 c1 c2 c3;&lt;/P&gt;&lt;P&gt;datalines;&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 2 3 11 12 13 111 112 113&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5 6 7 55 56 57 555 556 557&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 29 Sep 2013 23:16:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-rule-for-each-set-of-variables/m-p/97768#M290509</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2013-09-29T23:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: Help with rule for each set of variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-rule-for-each-set-of-variables/m-p/97769#M290510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please provide your desired output based on the attached sample?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This will ensure that we are interpreting what you are saying correctly.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Sep 2013 02:26:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-rule-for-each-set-of-variables/m-p/97769#M290510</guid>
      <dc:creator>Scott_Mitchell</dc:creator>
      <dc:date>2013-09-30T02:26:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help with rule for each set of variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-rule-for-each-set-of-variables/m-p/97770#M290511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Scott,&lt;/P&gt;&lt;P&gt;My output should look like:&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 2 3 11 12 13 111 112 113&lt;/P&gt;&lt;P&gt;2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 5 6 7 55 56 57 555 556 557&lt;/P&gt;&lt;P&gt;3&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0.4 0.66&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Essentially, there will be another row added to the file, and this row report the ratio.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HHC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Sep 2013 02:36:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-rule-for-each-set-of-variables/m-p/97770#M290511</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2013-09-30T02:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: Help with rule for each set of variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-rule-for-each-set-of-variables/m-p/97771#M290512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Do you have more than 2 rows of data? Is the same ratio to be calculated between each pair of input rows? Would row 4 in output be the 3rd input row and row 5 the ratio of 2nd and 3rd input rows or rows 4 and 5 be input rows 3 and 4 with output row 6 the ratio?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Sep 2013 15:37:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-rule-for-each-set-of-variables/m-p/97771#M290512</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2013-09-30T15:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: Help with rule for each set of variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-with-rule-for-each-set-of-variables/m-p/97772#M290513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I only have 2 rows data.&lt;/P&gt;&lt;P&gt;HHC&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 Sep 2013 15:40:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-with-rule-for-each-set-of-variables/m-p/97772#M290513</guid>
      <dc:creator>hhchenfx</dc:creator>
      <dc:date>2013-09-30T15:40:18Z</dc:date>
    </item>
  </channel>
</rss>

