<?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: New counting variable for values in a specific range (i.e. 0-33) in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/New-counting-variable-for-values-in-a-specific-range-i-e-0-33/m-p/777750#M247490</link>
    <description>Try the following:&lt;BR /&gt;&lt;BR /&gt;if largest(3, of var1-var5) &amp;gt;= 66 then category = "F";&lt;BR /&gt;else if largest(3, of var1-var5) &amp;lt;= 33 then category = "L";&lt;BR /&gt;else category = "M";&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Mon, 01 Nov 2021 19:09:23 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-11-01T19:09:23Z</dc:date>
    <item>
      <title>New counting variable for values in a specific range (i.e. 0-33)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/New-counting-variable-for-values-in-a-specific-range-i-e-0-33/m-p/777746#M247487</link>
      <description>&lt;P&gt;I need to create a new variable that categorizes survey responses (n=5 items, scored from 0-100) into three categories based on the number of responses that fall in a certain numerical range. I.e. if at least 3 scores fall into the 0-33 range, then the category in the new variable should equal L (where L means Languishing). If at least 3 scores fall into the 66-100, then the category in the new variable should equal F (where F means Flourishing). Else, new categorical variable should equal M (where M means Moderate).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The table below illustrates the type of data I'm working with.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;ID&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;Var1&lt;/STRONG&gt;&lt;/TD&gt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19:00:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/New-counting-variable-for-values-in-a-specific-range-i-e-0-33/m-p/777746#M247487</guid>
      <dc:creator>HBSU</dc:creator>
      <dc:date>2021-11-01T19:00:04Z</dc:date>
    </item>
    <item>
      <title>Re: New counting variable for values in a specific range (i.e. 0-33)</title>
      <link>https://communities.sas.com/t5/SAS-Programming/New-counting-variable-for-values-in-a-specific-range-i-e-0-33/m-p/777750#M247490</link>
      <description>Try the following:&lt;BR /&gt;&lt;BR /&gt;if largest(3, of var1-var5) &amp;gt;= 66 then category = "F";&lt;BR /&gt;else if largest(3, of var1-var5) &amp;lt;= 33 then category = "L";&lt;BR /&gt;else category = "M";&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 01 Nov 2021 19:09:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/New-counting-variable-for-values-in-a-specific-range-i-e-0-33/m-p/777750#M247490</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-11-01T19:09:23Z</dc:date>
    </item>
  </channel>
</rss>

