<?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: Running statistics for racial demographics in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Running-statistics-for-racial-demographics/m-p/620360#M182274</link>
    <description>&lt;P&gt;Sorry, my posts on this forum are never clear, especially since I can't copy my data or actual code over per my data use agreement. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess I'm asking- is there a way, after I have the multiracial participants identified (as they are var1 var2 var3...&amp;gt;=2), is there a way to sort of...sequester the multiracial participants, so I can find out the distribution of the single race (non-multiracial) participants?&amp;nbsp; Would a drop statement work for this?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 27 Jan 2020 22:08:43 GMT</pubDate>
    <dc:creator>klongway</dc:creator>
    <dc:date>2020-01-27T22:08:43Z</dc:date>
    <item>
      <title>Running statistics for racial demographics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-statistics-for-racial-demographics/m-p/620324#M182255</link>
      <description>&lt;P&gt;I have 8 racial variables, and participants can choose up to eight. The majority of people choose one or two, but I have 300 people who I've recorded as multiracial, due to clicking more than one option. I did this via making new variables and assigning 1s to the boxes that were checked, making it so that everyone who chose one race ended up with a score of one, and everyone who chose more than one was greater than one.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now that I've identified multiracial participants, I'd like to get the breakdown of single race participants- should I do that via dropping my multiracial participants? If I just run the original racial variables, the system chooses whatever is marked first- so if you marked black, white, and native american, you'd just show up as black.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My end goal is to have a statement like:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"300 participants chose more than 1 racial identifier and were considered multiracial. Of those 300, X percent identified as 2 races and X percent identified as 3 or more. Of the X participants who chose one racial identifier, X% identified as Black, X% identified as White, etc"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If wh=1, then Nwh=1&lt;/P&gt;&lt;P&gt;If wh=0 then Nwh=0&amp;nbsp;&lt;/P&gt;&lt;P&gt;If bl=2 then Nwbl=1&lt;/P&gt;&lt;P&gt;If bl=0 then Nwbl=0&lt;/P&gt;&lt;P&gt;This is repeated for all racial variables, then I have:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If Nwh+NwBl=1 then Prace="single"&lt;/P&gt;&lt;P&gt;If Nwh+NwBl&amp;gt;=2 then Prace="multi"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(except with all 8 variables going into the statement, not just the 2 example ones)&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 20:20:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-statistics-for-racial-demographics/m-p/620324#M182255</guid>
      <dc:creator>klongway</dc:creator>
      <dc:date>2020-01-27T20:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: Running statistics for racial demographics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-statistics-for-racial-demographics/m-p/620329#M182259</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/106227"&gt;@klongway&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Example code:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If wh=1, then Nwh=1&lt;/P&gt;
&lt;P&gt;If wh=0 then Nwh=0&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If bl=2 then Nwbl=1&lt;/P&gt;
&lt;P&gt;If bl=0 then Nwbl=0&lt;/P&gt;
&lt;P&gt;This is repeated for all racial variables, then I have:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If Nwh+NwBl=1 then Prace="single"&lt;/P&gt;
&lt;P&gt;If Nwh+NwBl&amp;gt;=2 then Prace="multi"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(except with all 8 variables going into the statement, not just the 2 example ones)&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;I have trouble understanding this code and logic ... and you didn't show us the data ... but if I am understanding you properly, you can use the SUM function to obtain whether or not the person identifies with one or more races&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;numrace=sum(of racevariable1-racevariable8);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;or if the variables are not consecutively numbered&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;numrace = sum (white,black,orange,green, ... );&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(where of course you use the actual names of the variables)&lt;/P&gt;
&lt;P&gt;and then&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;length prace $ 6;
If numrace=1 then Prace="single";
else Prace='multi';&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I would also suggest instead of creating a character variable Prace, you create a format and apply it to NUMRACE. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This whole solution assumes that your race variables have values 0 or 1 and not anything else, which I don't think you actually said.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 20:28:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-statistics-for-racial-demographics/m-p/620329#M182259</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-01-27T20:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: Running statistics for racial demographics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-statistics-for-racial-demographics/m-p/620357#M182273</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/106227"&gt;@klongway&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have 8 racial variables, and participants can choose up to eight. The majority of people choose one or two, but I have 300 people who I've recorded as multiracial, due to clicking more than one option. I did this via making new variables and assigning 1s to the boxes that were checked, making it so that everyone who chose one race ended up with a score of one, and everyone who chose more than one was greater than one.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now that I've identified multiracial participants, I'd like to get the breakdown of single race participants- should I do that via dropping my multiracial participants? If I just run the original racial variables, the system chooses whatever is marked first- so if you marked black, white, and native american, you'd just show up as black.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My end goal is to have a statement like:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"300 participants chose more than 1 racial identifier and were considered multiracial. Of those 300, X percent identified as 2 races and X percent identified as 3 or more. Of the X participants who chose one racial identifier, X% identified as Black, X% identified as White, etc"&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Since you say "identified as white", that implies that you have more variables then you are indicating. Or are you &lt;STRONG&gt;assuming&lt;/STRONG&gt; that the first choice selected is "identifies as"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unless there has been a specific report requirement generated before analysis to report this way I would tend to leave Multiracial as a single group if you don't have a separate question that has the "identify as" information.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;BTW, I've worked with data with multiple race categories that included an "identify as" that would get answers other than any of&amp;nbsp; the races recorded in the race response. Which is one reason unless required I'll leave things at multiracial.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 21:59:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-statistics-for-racial-demographics/m-p/620357#M182273</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-01-27T21:59:54Z</dc:date>
    </item>
    <item>
      <title>Re: Running statistics for racial demographics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-statistics-for-racial-demographics/m-p/620360#M182274</link>
      <description>&lt;P&gt;Sorry, my posts on this forum are never clear, especially since I can't copy my data or actual code over per my data use agreement. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess I'm asking- is there a way, after I have the multiracial participants identified (as they are var1 var2 var3...&amp;gt;=2), is there a way to sort of...sequester the multiracial participants, so I can find out the distribution of the single race (non-multiracial) participants?&amp;nbsp; Would a drop statement work for this?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 22:08:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-statistics-for-racial-demographics/m-p/620360#M182274</guid>
      <dc:creator>klongway</dc:creator>
      <dc:date>2020-01-27T22:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Running statistics for racial demographics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-statistics-for-racial-demographics/m-p/620367#M182279</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/106227"&gt;@klongway&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Sorry, my posts on this forum are never clear, especially since I can't copy my data or actual code over per my data use agreement. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I guess I'm asking- is there a way, after I have the multiracial participants identified (as they are var1 var2 var3...&amp;gt;=2), is there a way to sort of...sequester the multiracial participants, so I can find out the distribution of the single race (non-multiracial) participants?&amp;nbsp; Would a drop statement work for this?&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Yes there is a way, and I answered that earlier in this thread.&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 22:18:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-statistics-for-racial-demographics/m-p/620367#M182279</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-01-27T22:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: Running statistics for racial demographics</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Running-statistics-for-racial-demographics/m-p/620371#M182282</link>
      <description>&lt;P&gt;I'm sorry PaigeMiller, I didn't see your response until I'd replied above.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 27 Jan 2020 22:21:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Running-statistics-for-racial-demographics/m-p/620371#M182282</guid>
      <dc:creator>klongway</dc:creator>
      <dc:date>2020-01-27T22:21:06Z</dc:date>
    </item>
  </channel>
</rss>

