<?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: How to take a dichotomous variable (0,1) and make into 2 separate variables in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-take-a-dichotomous-variable-0-1-and-make-into-2-separate/m-p/804447#M316792</link>
    <description>&lt;P&gt;If the only possible meanings are SPOUSAL and NON_SPOUSAL then a single variable with two levels how ever they are coded captures all of the information.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But what are these other variables you are referencing in the code?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 28 Mar 2022 00:33:49 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2022-03-28T00:33:49Z</dc:date>
    <item>
      <title>How to take a dichotomous variable (0,1) and make into 2 separate variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-take-a-dichotomous-variable-0-1-and-make-into-2-separate/m-p/804444#M316790</link>
      <description>&lt;P&gt;The variable is now a dichotomous variable with 0 = spousal and 1 = nonspousal. In order to do analyses comparing these two variables against other variables I think I need to make them each a new variable. Is this correct? If yes, how would I go about doing that? If no, how do I compare these two variables against other variables?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Data X&lt;BR /&gt;Set Y&lt;BR /&gt;if cg_relation___1 = 1 then cg_relationr = 0;&lt;BR /&gt;if cg_relation___2 = 1 then cg_relationr = 1;&lt;BR /&gt;if cg_relation___3 = 1 then cg_relationr = 1;&lt;BR /&gt;if cg_relation___4 = 1 then cg_relationr = 1;&lt;BR /&gt;if cg_relation___5 = 1 then cg_relationr = 1;&lt;BR /&gt;if cg_relation___7 = 1 then cg_relationr = 1;&lt;BR /&gt;if cg_relation____8 = 1 then cg_relationr = .;&lt;BR /&gt;if cg_relation____9 = 1 then cg_relationr = .;&lt;BR /&gt;Run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the help. I'm a newbie.&lt;/P&gt;</description>
      <pubDate>Sun, 27 Mar 2022 22:19:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-take-a-dichotomous-variable-0-1-and-make-into-2-separate/m-p/804444#M316790</guid>
      <dc:creator>gtucke1</dc:creator>
      <dc:date>2022-03-27T22:19:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to take a dichotomous variable (0,1) and make into 2 separate variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-take-a-dichotomous-variable-0-1-and-make-into-2-separate/m-p/804447#M316792</link>
      <description>&lt;P&gt;If the only possible meanings are SPOUSAL and NON_SPOUSAL then a single variable with two levels how ever they are coded captures all of the information.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But what are these other variables you are referencing in the code?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 00:33:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-take-a-dichotomous-variable-0-1-and-make-into-2-separate/m-p/804447#M316792</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-03-28T00:33:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to take a dichotomous variable (0,1) and make into 2 separate variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-take-a-dichotomous-variable-0-1-and-make-into-2-separate/m-p/804484#M316810</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/414915"&gt;@gtucke1&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;The variable is now a dichotomous variable with 0 = spousal and 1 = nonspousal. In order to do analyses comparing these two variables against other variables I think I need to make them each a new variable. Is this correct? &lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;No not correct at all.&amp;nbsp; But you don't tell us what analysis you are going to do,&amp;nbsp; we'd need to know this in order to advise in more detail.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 10:48:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-take-a-dichotomous-variable-0-1-and-make-into-2-separate/m-p/804484#M316810</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-03-28T10:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to take a dichotomous variable (0,1) and make into 2 separate variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-take-a-dichotomous-variable-0-1-and-make-into-2-separate/m-p/804503#M316824</link>
      <description>&lt;P&gt;I will be comparing the spousal status (spousal non-spousal) to the number and type of unmet needs. There are 18 different types of needs (health care, education...).&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 13:26:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-take-a-dichotomous-variable-0-1-and-make-into-2-separate/m-p/804503#M316824</guid>
      <dc:creator>gtucke1</dc:creator>
      <dc:date>2022-03-28T13:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to take a dichotomous variable (0,1) and make into 2 separate variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-take-a-dichotomous-variable-0-1-and-make-into-2-separate/m-p/804518#M316831</link>
      <description>&lt;P&gt;So you have data like:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have ;
  input id $ spouse need1-need18;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;How are you planning to compare them?&lt;/P&gt;
&lt;P&gt;Do you just want to look at distributions?&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc means data=have;
  class spouse;
  var need1-need18;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Mar 2022 14:24:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-take-a-dichotomous-variable-0-1-and-make-into-2-separate/m-p/804518#M316831</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-03-28T14:24:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to take a dichotomous variable (0,1) and make into 2 separate variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-take-a-dichotomous-variable-0-1-and-make-into-2-separate/m-p/804524#M316837</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;If the only possible meanings are SPOUSAL and NON_SPOUSAL then a single variable with two levels how ever they are coded captures all of the information.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But what are these other variables you are referencing in the code?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I would place a small wager that this comes from some sort of "select one choice question" that has 8 choices. For bonus cash would also wager that 7 is some sort of "Other" with 8 and 9 the equivalents of Don't know, Not applicable and/or Refused to answer and the export dumps the data to one variable per choice.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Mar 2022 14:51:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-take-a-dichotomous-variable-0-1-and-make-into-2-separate/m-p/804524#M316837</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-03-28T14:51:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to take a dichotomous variable (0,1) and make into 2 separate variables</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-take-a-dichotomous-variable-0-1-and-make-into-2-separate/m-p/805138#M317115</link>
      <description>&lt;P&gt;I would like to look at distribution but also come up with a total percent of unmet needs for the 18 items.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Of X number of participants, X had __% of unmet needs.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Mar 2022 20:15:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-take-a-dichotomous-variable-0-1-and-make-into-2-separate/m-p/805138#M317115</guid>
      <dc:creator>gtucke1</dc:creator>
      <dc:date>2022-03-30T20:15:53Z</dc:date>
    </item>
  </channel>
</rss>

