<?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: Recoding 2s, 3s, 4s as 1s for race in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Recoding-2s-3s-4s-as-1s-for-race/m-p/600194#M173417</link>
    <description>&lt;P&gt;wow, i should have gotten that. Thanks!!!&lt;/P&gt;</description>
    <pubDate>Tue, 29 Oct 2019 22:07:25 GMT</pubDate>
    <dc:creator>klongway</dc:creator>
    <dc:date>2019-10-29T22:07:25Z</dc:date>
    <item>
      <title>Recoding 2s, 3s, 4s as 1s for race</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Recoding-2s-3s-4s-as-1s-for-race/m-p/600188#M173414</link>
      <description>&lt;P&gt;Hello again,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been banging my head on this and thought I'd turn to SAS Community for some advice.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have a government data set. The data has 15 racial categories. It is NOT 0/1 coded like I originally thought. People can select up to 15 of the 15 categories (so, someone could choose from 1-15 identifiers).&amp;nbsp; The data is coded like 1=chinese/0-didn't choose, 2=native alaskan/0=didn't choose; 3= burmese/0=didn't choose.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am struggling to code for identifying multiracial individuals.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had originally planned that 0=didn't choose and 1=chose that identifier, so anyone with a total of greater than 1 had chosen multiple racial identifiers and can be labeled "multiracial."&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How would I change the non 1 numbers for "chose this" into 1s? So instead of a person choosing native alaskan (2) and burmese (3) and equaling 5, I would want them to equal 2 (native alaskan-1, burmese=1).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this makes sense. Thanks!!!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 21:41:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Recoding-2s-3s-4s-as-1s-for-race/m-p/600188#M173414</guid>
      <dc:creator>klongway</dc:creator>
      <dc:date>2019-10-29T21:41:23Z</dc:date>
    </item>
    <item>
      <title>Re: Recoding 2s, 3s, 4s as 1s for race</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Recoding-2s-3s-4s-as-1s-for-race/m-p/600192#M173415</link>
      <description>&lt;P&gt;SAS treats 0 (or missing) as FALSE and any other number as TRUE.&amp;nbsp; So to convert your 2/0, 3/0,.... variables into 1/0 variables you can just do:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;chinese = not not chinese;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;So 0 will go to 1 and then back to 0.&amp;nbsp; Any other number, like 1,2,3,etc will go to 0 and then back to 1.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 21:55:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Recoding-2s-3s-4s-as-1s-for-race/m-p/600192#M173415</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2019-10-29T21:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Recoding 2s, 3s, 4s as 1s for race</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Recoding-2s-3s-4s-as-1s-for-race/m-p/600194#M173417</link>
      <description>&lt;P&gt;wow, i should have gotten that. Thanks!!!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Oct 2019 22:07:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Recoding-2s-3s-4s-as-1s-for-race/m-p/600194#M173417</guid>
      <dc:creator>klongway</dc:creator>
      <dc:date>2019-10-29T22:07:25Z</dc:date>
    </item>
    <item>
      <title>Re: Recoding 2s, 3s, 4s as 1s for race</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Recoding-2s-3s-4s-as-1s-for-race/m-p/600203#M173421</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
data test;
 do chinese=0 to 10;
  chinese_test=^^chinese;
  output;
 end;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 29 Oct 2019 22:38:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Recoding-2s-3s-4s-as-1s-for-race/m-p/600203#M173421</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-10-29T22:38:35Z</dc:date>
    </item>
  </channel>
</rss>

