<?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 Screening Several Variables to Create Conditional Varible in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Screening-Several-Variables-to-Create-Conditional-Varible/m-p/443473#M110950</link>
    <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to screen thought a set of 6 dichotomous variables (1/0), that each accounts for one disease (D1-D6)&lt;/P&gt;&lt;P&gt;From those I want to&amp;nbsp;create another categorical variable (Dany)&amp;nbsp;that will separate observations with '0-1 disease' and '=&amp;gt;2 more diseases'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I imagine this can be done with an array but I am quiet unsure how.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any tips are appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;scvp&lt;/P&gt;</description>
    <pubDate>Wed, 07 Mar 2018 19:30:12 GMT</pubDate>
    <dc:creator>scvp</dc:creator>
    <dc:date>2018-03-07T19:30:12Z</dc:date>
    <item>
      <title>Screening Several Variables to Create Conditional Varible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Screening-Several-Variables-to-Create-Conditional-Varible/m-p/443473#M110950</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to screen thought a set of 6 dichotomous variables (1/0), that each accounts for one disease (D1-D6)&lt;/P&gt;&lt;P&gt;From those I want to&amp;nbsp;create another categorical variable (Dany)&amp;nbsp;that will separate observations with '0-1 disease' and '=&amp;gt;2 more diseases'.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I imagine this can be done with an array but I am quiet unsure how.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any tips are appreciated!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;scvp&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 19:30:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Screening-Several-Variables-to-Create-Conditional-Varible/m-p/443473#M110950</guid>
      <dc:creator>scvp</dc:creator>
      <dc:date>2018-03-07T19:30:12Z</dc:date>
    </item>
    <item>
      <title>Re: Screening Several Variables to Create Conditional Varible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Screening-Several-Variables-to-Create-Conditional-Varible/m-p/443484#M110954</link>
      <description>&lt;P&gt;Even easier than using arrays:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;two_plus = sum(of d1-d6) &amp;gt; 1;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The new variable TWO_PLUS will be 1 (for two or more diseases) and 0 (for fewer than two diseases).&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 20:04:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Screening-Several-Variables-to-Create-Conditional-Varible/m-p/443484#M110954</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2018-03-07T20:04:50Z</dc:date>
    </item>
    <item>
      <title>Re: Screening Several Variables to Create Conditional Varible</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Screening-Several-Variables-to-Create-Conditional-Varible/m-p/443494#M110955</link>
      <description>&lt;P&gt;And an excellent example of why coding dichotomous as 1/0 instead of Y/N, T/F or similar character coding schemes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Another approach might be to just do the sum and use a format to create groupings on a single value such&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc format;&lt;/P&gt;
&lt;P&gt;value disease2groups&lt;/P&gt;
&lt;P&gt;0,1 = '0 or 1'&lt;/P&gt;
&lt;P&gt;2-high ='2 or more'&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;value disease3groups&lt;/P&gt;
&lt;P&gt;0,1 = '0 or 1'&lt;/P&gt;
&lt;P&gt;2,3 = '2 or 3'&lt;/P&gt;
&lt;P&gt;4 - high = '4 or more'&lt;/P&gt;
&lt;P&gt;;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then use the format at the time of use for which grouping is desired on the sum variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Mar 2018 20:28:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Screening-Several-Variables-to-Create-Conditional-Varible/m-p/443494#M110955</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-03-07T20:28:52Z</dc:date>
    </item>
  </channel>
</rss>

