<?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: question about where statement within Proc Logist in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/question-about-where-statement-within-Proc-Logist/m-p/419420#M67812</link>
    <description>&lt;P&gt;Did you try&lt;/P&gt;
&lt;PRE&gt;proc logist descending; 
   where case='1';
   class VARIABLE1 VARIABLE2 VARIABLE3; 
   model Payment=VARIABLE1 VARIABLE2 VARIABLE3 VARIABLE4 / rsquare; 

run;&lt;/PRE&gt;
&lt;P&gt;It is a very good habit to always use the data= on the proc statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are working with multiple data sets with the same variables as in the modeling code there is a chance that you might just accidentally run this against the wrong data set if you run blocks of code manually.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any chance that should be LOGISTIC?&lt;/P&gt;
&lt;P&gt;if that doesn't work then this should&lt;/P&gt;
&lt;PRE&gt;proc logist descending data=_last_(where= ( case='1') ); &lt;/PRE&gt;</description>
    <pubDate>Fri, 08 Dec 2017 00:25:07 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2017-12-08T00:25:07Z</dc:date>
    <item>
      <title>question about where statement within Proc Logist</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/question-about-where-statement-within-Proc-Logist/m-p/419417#M67810</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm using SAS 9.4 full version. Is there a place in the following proc logist coding to put a where statement?&amp;nbsp; I'd like to run this regression only when a binary variable CASE='1'.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Laura&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logist descending; 

class VARIABLE1 VARIABLE2 VARIABLE3; 

model Payment=VARIABLE1 VARIABLE2 VARIABLE3 VARIABLE4 / rsquare; 

run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Dec 2017 00:14:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/question-about-where-statement-within-Proc-Logist/m-p/419417#M67810</guid>
      <dc:creator>lmyers2</dc:creator>
      <dc:date>2017-12-08T00:14:02Z</dc:date>
    </item>
    <item>
      <title>Re: question about where statement within Proc Logist</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/question-about-where-statement-within-Proc-Logist/m-p/419419#M67811</link>
      <description>&lt;P&gt;proc logistic?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You can specify a WHERE statement most anywhere;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc ...;&lt;/P&gt;
&lt;P&gt;where case eq '1';&lt;/P&gt;
&lt;P&gt;... more statements ...&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I usually use the data set option.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc logistic data=sashelp.class(where=(age le 15));
  class sex;
  model sex = height weight;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2017 00:26:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/question-about-where-statement-within-Proc-Logist/m-p/419419#M67811</guid>
      <dc:creator>WarrenKuhfeld</dc:creator>
      <dc:date>2017-12-08T00:26:37Z</dc:date>
    </item>
    <item>
      <title>Re: question about where statement within Proc Logist</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/question-about-where-statement-within-Proc-Logist/m-p/419420#M67812</link>
      <description>&lt;P&gt;Did you try&lt;/P&gt;
&lt;PRE&gt;proc logist descending; 
   where case='1';
   class VARIABLE1 VARIABLE2 VARIABLE3; 
   model Payment=VARIABLE1 VARIABLE2 VARIABLE3 VARIABLE4 / rsquare; 

run;&lt;/PRE&gt;
&lt;P&gt;It is a very good habit to always use the data= on the proc statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are working with multiple data sets with the same variables as in the modeling code there is a chance that you might just accidentally run this against the wrong data set if you run blocks of code manually.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any chance that should be LOGISTIC?&lt;/P&gt;
&lt;P&gt;if that doesn't work then this should&lt;/P&gt;
&lt;PRE&gt;proc logist descending data=_last_(where= ( case='1') ); &lt;/PRE&gt;</description>
      <pubDate>Fri, 08 Dec 2017 00:25:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/question-about-where-statement-within-Proc-Logist/m-p/419420#M67812</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2017-12-08T00:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: question about where statement within Proc Logist</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/question-about-where-statement-within-Proc-Logist/m-p/419427#M67815</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/165633"&gt;@lmyers2&lt;/a&gt;&amp;nbsp;Make sure to look up how CLASS variables are handled, the default encoding is GLM which is unlikely what you want.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2017 00:54:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/question-about-where-statement-within-Proc-Logist/m-p/419427#M67815</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-12-08T00:54:57Z</dc:date>
    </item>
  </channel>
</rss>

