<?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: Where statement in PROC LOGISTIC in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Where-statement-in-PROC-LOGISTIC/m-p/343047#M63353</link>
    <description>&lt;P&gt;Only you really know based on your logic. Make some test data and ensure it behaves the way you expect.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Scenarios to test:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;X1, X2, X3, X4, X5 all are either 1/2&lt;/P&gt;
&lt;P&gt;Any of X1-X5 is not a 1/2&lt;/P&gt;
&lt;P&gt;All of X1-X5 is not a 1/2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may need to break these out into smaller cases but you'll probably understand your logic better at that point.&lt;/P&gt;</description>
    <pubDate>Tue, 21 Mar 2017 19:41:08 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-03-21T19:41:08Z</dc:date>
    <item>
      <title>Where statement in PROC LOGISTIC</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Where-statement-in-PROC-LOGISTIC/m-p/343040#M63352</link>
      <description>&lt;P&gt;Hello:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to run a logistic model in the binary outcome (Y). &amp;nbsp;In the multivariates, I only need the condition 1 and 2. &amp;nbsp;Therefore, I use "and" to select all of them. &amp;nbsp;Am I correct? &amp;nbsp;Or should I use "or"? &amp;nbsp;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc logistic data=test;&lt;BR /&gt;class Y (ref="1") X1 (ref="2") X2 (ref="2") X3 (ref="2") X4 (ref="2") X5 (ref="2");&lt;BR /&gt;model Y = X1 X2 X3 X4 X5;&lt;BR /&gt;where X1 in (1,2) and X2 in (1,2) and X3 in (1,2) and X3 in (1,2) and X3 in (1,2);&lt;BR /&gt;run;&lt;BR /&gt;quit;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 19:24:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Where-statement-in-PROC-LOGISTIC/m-p/343040#M63352</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2017-03-21T19:24:53Z</dc:date>
    </item>
    <item>
      <title>Re: Where statement in PROC LOGISTIC</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Where-statement-in-PROC-LOGISTIC/m-p/343047#M63353</link>
      <description>&lt;P&gt;Only you really know based on your logic. Make some test data and ensure it behaves the way you expect.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Scenarios to test:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;X1, X2, X3, X4, X5 all are either 1/2&lt;/P&gt;
&lt;P&gt;Any of X1-X5 is not a 1/2&lt;/P&gt;
&lt;P&gt;All of X1-X5 is not a 1/2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You may need to break these out into smaller cases but you'll probably understand your logic better at that point.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Mar 2017 19:41:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Where-statement-in-PROC-LOGISTIC/m-p/343047#M63353</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-03-21T19:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Where statement in PROC LOGISTIC</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Where-statement-in-PROC-LOGISTIC/m-p/343073#M63354</link>
      <description>&lt;P&gt;Get more insight about your data with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select 
	x1, x2, x3, x4, x5, 
	count(*) as n,
	 case 
		when X1 in (1,2) and X2 in (1,2) and X3 in (1,2) and X4 in (1,2) and X5 in (1,2) then "Yes"
		else "No" end as included
	from test
	group by x1, x2, x3, x4, x5;
quit;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 21 Mar 2017 20:59:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Where-statement-in-PROC-LOGISTIC/m-p/343073#M63354</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2017-03-21T20:59:25Z</dc:date>
    </item>
  </channel>
</rss>

