<?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: Help - how to identify overlap in different categories in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Help-how-to-identify-overlap-in-different-categories/m-p/775030#M246369</link>
    <description>&lt;P&gt;&lt;SPAN&gt;FYI - I've updated your subject line of the question to make it more related to your question otherwise every question on here would have the same title.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This question is testing your knowledge of AND/OR logic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;An IF/WHERE statement would be the most likely solution here.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/403419"&gt;@Hani18&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;hey friends, I've been stuck on the problem. can someone please help me with this&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Information on presence or absence (yes or no) of two characteristics A and B is available for several individuals.&lt;/P&gt;
&lt;P&gt;ID A B&lt;BR /&gt;217 no no&lt;BR /&gt;229 no yes&lt;BR /&gt;156 yes no&lt;BR /&gt;205 yes no&lt;BR /&gt;178 no yes&lt;BR /&gt;101 yes yes&lt;BR /&gt;112 no no&lt;BR /&gt;222 no yes&lt;BR /&gt;105 yes yes&lt;BR /&gt;144 no no&lt;BR /&gt;211 yes yes&lt;BR /&gt;244 no yes&lt;BR /&gt;139 yes yes&lt;BR /&gt;166 no no&lt;BR /&gt;109 yes yes&lt;BR /&gt;178 no yes&lt;BR /&gt;243 yes yes&lt;BR /&gt;219 no no&lt;BR /&gt;113 yes yes&lt;BR /&gt;194 no yes&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Compute the number of individuals who have&lt;/P&gt;
&lt;P&gt;(a) characteristic A&lt;/P&gt;
&lt;P&gt;(b) characteristic B&lt;/P&gt;
&lt;P&gt;(c) only characteristic A&lt;/P&gt;
&lt;P&gt;(d) only characteristic B&lt;/P&gt;
&lt;P&gt;(e) both characteristics&lt;/P&gt;
&lt;P&gt;(f) neither characteristic&lt;/P&gt;
&lt;P&gt;(g) either characteristic&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Oct 2021 02:06:12 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2021-10-19T02:06:12Z</dc:date>
    <item>
      <title>Help - how to identify overlap in different categories</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-how-to-identify-overlap-in-different-categories/m-p/775019#M246364</link>
      <description>&lt;P&gt;hey friends, I've been stuck on the problem. can someone please help me with this&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Information on presence or absence (yes or no) of two characteristics A and B is available for several individuals.&lt;/P&gt;
&lt;P&gt;ID A B&lt;BR /&gt;217 no no&lt;BR /&gt;229 no yes&lt;BR /&gt;156 yes no&lt;BR /&gt;205 yes no&lt;BR /&gt;178 no yes&lt;BR /&gt;101 yes yes&lt;BR /&gt;112 no no&lt;BR /&gt;222 no yes&lt;BR /&gt;105 yes yes&lt;BR /&gt;144 no no&lt;BR /&gt;211 yes yes&lt;BR /&gt;244 no yes&lt;BR /&gt;139 yes yes&lt;BR /&gt;166 no no&lt;BR /&gt;109 yes yes&lt;BR /&gt;178 no yes&lt;BR /&gt;243 yes yes&lt;BR /&gt;219 no no&lt;BR /&gt;113 yes yes&lt;BR /&gt;194 no yes&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Compute the number of individuals who have&lt;/P&gt;
&lt;P&gt;(a) characteristic A&lt;/P&gt;
&lt;P&gt;(b) characteristic B&lt;/P&gt;
&lt;P&gt;(c) only characteristic A&lt;/P&gt;
&lt;P&gt;(d) only characteristic B&lt;/P&gt;
&lt;P&gt;(e) both characteristics&lt;/P&gt;
&lt;P&gt;(f) neither characteristic&lt;/P&gt;
&lt;P&gt;(g) either characteristic&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 02:04:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-how-to-identify-overlap-in-different-categories/m-p/775019#M246364</guid>
      <dc:creator>Hani18</dc:creator>
      <dc:date>2021-10-19T02:04:30Z</dc:date>
    </item>
    <item>
      <title>Re: Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-how-to-identify-overlap-in-different-categories/m-p/775020#M246365</link>
      <description>&lt;P&gt;Please include appropriate words in the title.&lt;/P&gt;
&lt;P&gt;The sample code is given below.&lt;BR /&gt;For the rest, please think a little on your own.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
length id 8 a $3 b $3;
input id a b;
datalines;
217 no no
229 no yes
156 yes no
205 yes no
178 no yes
101 yes yes
112 no no
222 no yes
105 yes yes
144 no no
211 yes yes
244 no yes
139 yes yes
166 no no
109 yes yes
178 no yes
243 yes yes
219 no no
113 yes yes
194 no yes
run;

data want_a;
  set have;
  where a='yes';
run;
data want_c;
  set have;
  where a='yes' and b='no';
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 19 Oct 2021 00:44:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-how-to-identify-overlap-in-different-categories/m-p/775020#M246365</guid>
      <dc:creator>japelin</dc:creator>
      <dc:date>2021-10-19T00:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-how-to-identify-overlap-in-different-categories/m-p/775021#M246366</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
  input ID$ A$ B$;
  cards;
217 no no
229 no yes
156 yes no
205 yes no
178 no yes
101 yes yes
112 no no
222 no yes
105 yes yes
144 no no
211 yes yes
244 no yes
139 yes yes
166 no no
109 yes yes
178 no yes
243 yes yes
219 no no
113 yes yes
194 no yes
;
run;

data want;
  set have end = eof;
    
  _A + (A = 'yes');
  _B + (B = 'yes');
  _C + (A = 'yes' and B ^= 'yes');
  _D + (B = 'yes' and A ^= 'yes');
  _E + (A = 'yes' and B = 'yes');
  _F + (A ^= 'yes' and B ^= 'yes');
  _G + (A = 'yes' or B = 'yes');
  if eof;

  put (_A _B _C _D _E _F _G) (=);
run;&lt;BR /&gt;_A=9 _B=13 _C=2 _D=6 _E=7 _F=5 _G=15&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;It is a very basic question, I really recommend you to learn &amp;lt;The little SAS book&amp;gt; immediately.&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 00:52:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-how-to-identify-overlap-in-different-categories/m-p/775021#M246366</guid>
      <dc:creator>whymath</dc:creator>
      <dc:date>2021-10-19T00:52:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help - how to identify overlap in different categories</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Help-how-to-identify-overlap-in-different-categories/m-p/775030#M246369</link>
      <description>&lt;P&gt;&lt;SPAN&gt;FYI - I've updated your subject line of the question to make it more related to your question otherwise every question on here would have the same title.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This question is testing your knowledge of AND/OR logic.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;An IF/WHERE statement would be the most likely solution here.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/403419"&gt;@Hani18&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;hey friends, I've been stuck on the problem. can someone please help me with this&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Information on presence or absence (yes or no) of two characteristics A and B is available for several individuals.&lt;/P&gt;
&lt;P&gt;ID A B&lt;BR /&gt;217 no no&lt;BR /&gt;229 no yes&lt;BR /&gt;156 yes no&lt;BR /&gt;205 yes no&lt;BR /&gt;178 no yes&lt;BR /&gt;101 yes yes&lt;BR /&gt;112 no no&lt;BR /&gt;222 no yes&lt;BR /&gt;105 yes yes&lt;BR /&gt;144 no no&lt;BR /&gt;211 yes yes&lt;BR /&gt;244 no yes&lt;BR /&gt;139 yes yes&lt;BR /&gt;166 no no&lt;BR /&gt;109 yes yes&lt;BR /&gt;178 no yes&lt;BR /&gt;243 yes yes&lt;BR /&gt;219 no no&lt;BR /&gt;113 yes yes&lt;BR /&gt;194 no yes&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Compute the number of individuals who have&lt;/P&gt;
&lt;P&gt;(a) characteristic A&lt;/P&gt;
&lt;P&gt;(b) characteristic B&lt;/P&gt;
&lt;P&gt;(c) only characteristic A&lt;/P&gt;
&lt;P&gt;(d) only characteristic B&lt;/P&gt;
&lt;P&gt;(e) both characteristics&lt;/P&gt;
&lt;P&gt;(f) neither characteristic&lt;/P&gt;
&lt;P&gt;(g) either characteristic&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2021 02:06:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Help-how-to-identify-overlap-in-different-categories/m-p/775030#M246369</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-10-19T02:06:12Z</dc:date>
    </item>
  </channel>
</rss>

