<?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 Help creating a dichotomous variable in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Help-creating-a-dichotomous-variable/m-p/866092#M342040</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am doing some work on a dataset looking at infectious disease outcomes and their relationship to socioeconomic variables. I have a continuous "number of people in the household outcome" that I am trying to turn into a dichotomous variable (greater than 5 and less than or equal to 5). The variable currently ranges from 2-16. How can I go about coding this?&lt;/P&gt;&lt;P&gt;Thanks so much for your help!&lt;/P&gt;</description>
    <pubDate>Fri, 24 Mar 2023 11:59:40 GMT</pubDate>
    <dc:creator>mimosa09</dc:creator>
    <dc:date>2023-03-24T11:59:40Z</dc:date>
    <item>
      <title>Help creating a dichotomous variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-creating-a-dichotomous-variable/m-p/866092#M342040</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am doing some work on a dataset looking at infectious disease outcomes and their relationship to socioeconomic variables. I have a continuous "number of people in the household outcome" that I am trying to turn into a dichotomous variable (greater than 5 and less than or equal to 5). The variable currently ranges from 2-16. How can I go about coding this?&lt;/P&gt;&lt;P&gt;Thanks so much for your help!&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2023 11:59:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-creating-a-dichotomous-variable/m-p/866092#M342040</guid>
      <dc:creator>mimosa09</dc:creator>
      <dc:date>2023-03-24T11:59:40Z</dc:date>
    </item>
    <item>
      <title>Re: Help creating a dichotomous variable</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-creating-a-dichotomous-variable/m-p/866137#M342041</link>
      <description>&lt;P&gt;If I understand you, you want a dummy variable that is true (or 1) if the household is &amp;gt; 5, else it should be 0 (or false).&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is one simple way to calculate this. Note it doesn't take into account what should happen if the continuous variable has a missing value.&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;data want;
 set have;
 length is_household_gt_5 8;
 /* assuming household_size is continuous */
 is_household_gt_5 = (houshold_size &amp;gt; 5);
run;
 &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2023 14:36:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-creating-a-dichotomous-variable/m-p/866137#M342041</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2023-03-24T14:36:15Z</dc:date>
    </item>
  </channel>
</rss>

