<?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: Combine &amp;quot;where&amp;quot; and &amp;quot;keep&amp;quot; conditions in ods output dataset for proc logisti in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Combine-quot-where-quot-and-quot-keep-quot-conditions-in-ods/m-p/801346#M40398</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods output ParameterEstimates = logit_model (where=(Variable=temp) keep=Variable Estimate ProbChiSq);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;KEEP= does not get its own set of parenthesis, it is enclosed in the parentheses that all data set options are enclosed in&lt;/P&gt;
&lt;P&gt;on the other hand&lt;/P&gt;
&lt;P&gt;WHERE= is always followed by a set of parentheses, and also is enclosed in&amp;nbsp;the parentheses that all data set options are enclosed in&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your code still fails where &lt;FONT face="courier new,courier"&gt;Variable=temp&lt;/FONT&gt; because there is no variable named &lt;FONT face="courier new,courier"&gt;temp&lt;/FONT&gt; in the data set ... you don't want to compare &lt;FONT face="courier new,courier"&gt;variable&lt;/FONT&gt; to a different variable named &lt;FONT face="courier new,courier"&gt;temp&lt;/FONT&gt;&amp;nbsp;(which does not exist), you want to compare &lt;FONT face="courier new,courier"&gt;variable&lt;/FONT&gt; to a specific value in the column &lt;FONT face="courier new,courier"&gt;variable&lt;/FONT&gt; ... so homework assignment ... what is the proper SAS syntax if you want to test if the value of &lt;FONT face="courier new,courier"&gt;variable&lt;/FONT&gt;&amp;nbsp;is equal to a specific value ... ???&lt;/P&gt;</description>
    <pubDate>Thu, 10 Mar 2022 15:35:17 GMT</pubDate>
    <dc:creator>PaigeMiller</dc:creator>
    <dc:date>2022-03-10T15:35:17Z</dc:date>
    <item>
      <title>Combine "where" and "keep" conditions in ods output dataset for proc logistic?</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Combine-quot-where-quot-and-quot-keep-quot-conditions-in-ods/m-p/801345#M40397</link>
      <description>&lt;P&gt;I'm running a large number of logistic regressions and would like to specify particular output statistics from the proc logistic ods output dataset.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, using the SAS Remission dataset from&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.3/statug/statug_logistic_examples01.htm" target="_self"&gt;here&lt;/A&gt;:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data Remission;
   input remiss cell smear infil li blast temp;
   label remiss='Complete Remission';
   datalines;
1   .8   .83  .66  1.9  1.1     .996
1   .9   .36  .32  1.4   .74    .992
0   .8   .88  .7    .8   .176   .982
0  1     .87  .87   .7  1.053   .986
1   .9   .75  .68  1.3   .519   .98
0  1     .65  .65   .6   .519   .982
1   .95  .97  .92  1    1.23    .992
0   .95  .87  .83  1.9  1.354  1.02
0  1     .45  .45   .8   .322   .999
0   .95  .36  .34   .5  0      1.038
0   .85  .39  .33   .7   .279   .988
0   .7   .76  .53  1.2   .146   .982
0   .8   .46  .37   .4   .38   1.006
0   .2   .39  .08   .8   .114   .99
0  1     .9   .9   1.1  1.037   .99
1  1     .84  .84  1.9  2.064  1.02
0   .65  .42  .27   .5   .114  1.014
0  1     .75  .75  1    1.322  1.004
0   .5   .44  .22   .6   .114   .99
1  1     .63  .63  1.1  1.072   .986
0  1     .33  .33   .4   .176  1.01
0   .9   .93  .84   .6  1.591  1.02
1  1     .58  .58  1     .531  1.002
0   .95  .32  .3   1.6   .886   .988
1  1     .6   .6   1.7   .964   .99
1  1     .69  .69   .9   .398   .986
0  1     .73  .73   .7   .398   .986
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;I'd like to run the following ods output, but SAS doesn't like me combining two conditions:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;ods trace on;&lt;BR /&gt;proc logistic data=Remission;&lt;BR /&gt;   model remiss(event='1') = cell smear infil li blast temp;&lt;BR /&gt;   ods output ParameterEstimates = logit_model (where=(Variable=temp)(keep=Variable Estimate ProbChiSq));&lt;BR /&gt;run;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;Is there a way to make this work? I've tried a few variations with &amp;amp; without parentheses but no success.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 15:05:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Combine-quot-where-quot-and-quot-keep-quot-conditions-in-ods/m-p/801345#M40397</guid>
      <dc:creator>RobertWF1</dc:creator>
      <dc:date>2022-03-10T15:05:21Z</dc:date>
    </item>
    <item>
      <title>Re: Combine "where" and "keep" conditions in ods output dataset for proc logisti</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Combine-quot-where-quot-and-quot-keep-quot-conditions-in-ods/m-p/801346#M40398</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods output ParameterEstimates = logit_model (where=(Variable=temp) keep=Variable Estimate ProbChiSq);&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;KEEP= does not get its own set of parenthesis, it is enclosed in the parentheses that all data set options are enclosed in&lt;/P&gt;
&lt;P&gt;on the other hand&lt;/P&gt;
&lt;P&gt;WHERE= is always followed by a set of parentheses, and also is enclosed in&amp;nbsp;the parentheses that all data set options are enclosed in&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Your code still fails where &lt;FONT face="courier new,courier"&gt;Variable=temp&lt;/FONT&gt; because there is no variable named &lt;FONT face="courier new,courier"&gt;temp&lt;/FONT&gt; in the data set ... you don't want to compare &lt;FONT face="courier new,courier"&gt;variable&lt;/FONT&gt; to a different variable named &lt;FONT face="courier new,courier"&gt;temp&lt;/FONT&gt;&amp;nbsp;(which does not exist), you want to compare &lt;FONT face="courier new,courier"&gt;variable&lt;/FONT&gt; to a specific value in the column &lt;FONT face="courier new,courier"&gt;variable&lt;/FONT&gt; ... so homework assignment ... what is the proper SAS syntax if you want to test if the value of &lt;FONT face="courier new,courier"&gt;variable&lt;/FONT&gt;&amp;nbsp;is equal to a specific value ... ???&lt;/P&gt;</description>
      <pubDate>Thu, 10 Mar 2022 15:35:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Combine-quot-where-quot-and-quot-keep-quot-conditions-in-ods/m-p/801346#M40398</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-03-10T15:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: Combine "where" and "keep" conditions in ods output dataset for proc logisti</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Combine-quot-where-quot-and-quot-keep-quot-conditions-in-ods/m-p/801366#M40399</link>
      <description>Thank you, this works! &lt;BR /&gt;&lt;BR /&gt;I forgot to add quotation marks around temp, once I did it ran smoothly.</description>
      <pubDate>Thu, 10 Mar 2022 16:02:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Combine-quot-where-quot-and-quot-keep-quot-conditions-in-ods/m-p/801366#M40399</guid>
      <dc:creator>RobertWF1</dc:creator>
      <dc:date>2022-03-10T16:02:29Z</dc:date>
    </item>
  </channel>
</rss>

