<?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: Simple Dichotomous Variable Change in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Simple-Dichotomous-Variable-Change/m-p/811282#M33904</link>
    <description>&lt;P&gt;I suspect there is more to this problem than you have stated, but nevertheless&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if race='AA' then race="1";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;alternatively, assign a FORMAT to race where 'AA' is displayed as "1"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which brings up the question, why bother? How is a value of "1" more useful than a value of "AA"?&lt;/P&gt;</description>
    <pubDate>Tue, 03 May 2022 19:26:32 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-05-03T19:26:32Z</dc:date>
    <item>
      <title>Simple Dichotomous Variable Change</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Simple-Dichotomous-Variable-Change/m-p/811281#M33903</link>
      <description>&lt;P&gt;How do I change a variable Ex: Race that is already coded AA or W for African American or white into a simple "1" or "0"??? I cannot find this on SAS Help. TIA.&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 17:04:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Simple-Dichotomous-Variable-Change/m-p/811281#M33903</guid>
      <dc:creator>krath</dc:creator>
      <dc:date>2022-05-03T17:04:00Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Dichotomous Variable Change</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Simple-Dichotomous-Variable-Change/m-p/811282#M33904</link>
      <description>&lt;P&gt;I suspect there is more to this problem than you have stated, but nevertheless&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;if race='AA' then race="1";&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;alternatively, assign a FORMAT to race where 'AA' is displayed as "1"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which brings up the question, why bother? How is a value of "1" more useful than a value of "AA"?&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 19:26:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Simple-Dichotomous-Variable-Change/m-p/811282#M33904</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-05-03T19:26:32Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Dichotomous Variable Change</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Simple-Dichotomous-Variable-Change/m-p/811283#M33905</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/424570"&gt;@krath&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;How do I change a variable Ex: Race that is already coded AA or W for African American or white into a simple "1" or "0"??? I cannot find this on SAS Help. TIA.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Do you have character variable that has value 'AA' or 'W'?&lt;/P&gt;
&lt;P&gt;Do you want a numeric variable? Or a character variable?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want a numeric variable then you need to make a new variable.&lt;/P&gt;
&lt;P&gt;So if the variable only ever has AA or W (and non are blank or have other values) then you could just assign the result of a boolean expression to your new variable.&amp;nbsp; So this step will create RACEN that will be 1 when RACE is AA and 0 otherwise.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
  set have;
  racen = (race='AA');
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 03 May 2022 17:09:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Simple-Dichotomous-Variable-Change/m-p/811283#M33905</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-05-03T17:09:13Z</dc:date>
    </item>
  </channel>
</rss>

