<?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: Problems with If-Then Statements in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/Problems-with-If-Then-Statements/m-p/626616#M30138</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/313316"&gt;@bnd&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for the output.&lt;/P&gt;
&lt;P&gt;It seems that 2 people have white=1 and Af_amer=1 -&amp;gt; maybe you should clean these data first.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d’écran 2020-02-22 à 09.11.55.png" style="width: 200px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36323i767E77E359D6AA4A/image-size/small?v=v2&amp;amp;px=200" role="button" title="Capture d’écran 2020-02-22 à 09.11.55.png" alt="Capture d’écran 2020-02-22 à 09.11.55.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 22 Feb 2020 08:12:39 GMT</pubDate>
    <dc:creator>ed_sas_member</dc:creator>
    <dc:date>2020-02-22T08:12:39Z</dc:date>
    <item>
      <title>Problems with If-Then Statements</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Problems-with-If-Then-Statements/m-p/626605#M30134</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am having some issues with the if-then statement. I am trying to make white and black into a new variable called white_black so that I can compare the two using just one variable. Both the white and black variables are coded as 1 if a person is that race and 0 if they are not. There are a total of 320 white individuals and 76 black individuals. When I place the variables into the if-then statement, it seems that there are 2 fewer people included in either group. For example, there may be 320 for white and 74 for black. I am not sure why this is happening. My code is provided below.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;if white = 1 then black_white = 1&lt;/P&gt;&lt;P&gt;if black = 1 then black_white = 0&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2020 05:56:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Problems-with-If-Then-Statements/m-p/626605#M30134</guid>
      <dc:creator>bnd</dc:creator>
      <dc:date>2020-02-22T05:56:03Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with If-Then Statements</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Problems-with-If-Then-Statements/m-p/626606#M30135</link>
      <description>Hi &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/313316"&gt;@bnd&lt;/a&gt;&lt;BR /&gt;Could you please run a proc freq to look at the data and share the result?&lt;BR /&gt;&lt;BR /&gt;Proc freq data=have;&lt;BR /&gt;Tables white * black / nocum nopercent;&lt;BR /&gt;Run;</description>
      <pubDate>Sat, 22 Feb 2020 06:03:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Problems-with-If-Then-Statements/m-p/626606#M30135</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-02-22T06:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with If-Then Statements</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Problems-with-If-Then-Statements/m-p/626609#M30136</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/292097"&gt;@ed_sas_member&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have included the results in the attachment below.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2020 06:20:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Problems-with-If-Then-Statements/m-p/626609#M30136</guid>
      <dc:creator>bnd</dc:creator>
      <dc:date>2020-02-22T06:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with If-Then Statements</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Problems-with-If-Then-Statements/m-p/626616#M30138</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/313316"&gt;@bnd&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for the output.&lt;/P&gt;
&lt;P&gt;It seems that 2 people have white=1 and Af_amer=1 -&amp;gt; maybe you should clean these data first.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture d’écran 2020-02-22 à 09.11.55.png" style="width: 200px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/36323i767E77E359D6AA4A/image-size/small?v=v2&amp;amp;px=200" role="button" title="Capture d’écran 2020-02-22 à 09.11.55.png" alt="Capture d’écran 2020-02-22 à 09.11.55.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2020 08:12:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Problems-with-If-Then-Statements/m-p/626616#M30138</guid>
      <dc:creator>ed_sas_member</dc:creator>
      <dc:date>2020-02-22T08:12:39Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with If-Then Statements</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Problems-with-If-Then-Statements/m-p/626618#M30139</link>
      <description>&lt;P&gt;Your "problem" is caused by 7 people who consider themselves neither af_amer nor white, and 2 who think they are af_amer&amp;nbsp;&lt;EM&gt;and&lt;/EM&gt; white.&lt;/P&gt;
&lt;P&gt;So instead of 401, your if/then will add up to 396.&lt;/P&gt;
&lt;P&gt;Correction: you'll have 7 missing, 320 "white", and 74 "black", because with the double identification white overrides black.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;PS your question is a nice illustration of Maxim 3 and the usefulness of proc freq.&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2020 08:27:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Problems-with-If-Then-Statements/m-p/626618#M30139</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-02-22T08:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: Problems with If-Then Statements</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/Problems-with-If-Then-Statements/m-p/626648#M30147</link>
      <description>&lt;P&gt;Thanks!&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/11562"&gt;@Kurt_Bremser&lt;/a&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/292097"&gt;@ed_sas_member&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I kept trying to figure out what was going on exactly. After running the frequency table and reading over both of your comments, everything made perfect sense.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks so much for your help!&lt;/P&gt;</description>
      <pubDate>Sat, 22 Feb 2020 17:57:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/Problems-with-If-Then-Statements/m-p/626648#M30147</guid>
      <dc:creator>bnd</dc:creator>
      <dc:date>2020-02-22T17:57:59Z</dc:date>
    </item>
  </channel>
</rss>

