<?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: Excluding output when using proc logistic with selection = stepwise option in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Excluding-output-when-using-proc-logistic-with-selection/m-p/760177#M240351</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16492"&gt;@MaryA_Marion&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't know why outputs such as&amp;nbsp;&lt;FONT face="courier new,courier"&gt;ROCCurve&lt;/FONT&gt; and&amp;nbsp;&lt;FONT face="courier new,courier"&gt;LackFitPartition&lt;/FONT&gt;, which you have explicitly excluded, would appear in the output. The first thing to check is, of course, the log: Did your ODS EXCLUDE statement run &lt;EM&gt;immediately&lt;/EM&gt; before the PROC LOGISTIC step and there are no errors, warnings or suspicious notes in the log?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The second step, if needed, would be to close the SAS session and run the code in a new session. Do the excluded parts of the output still occur? What does &lt;FONT face="courier new,courier"&gt;ods show;&lt;/FONT&gt;&amp;nbsp;(cf.&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsug/n039755ylf7oppn141m3puregz1r.htm" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt;) write to the log if you insert it between the ODS EXCLUDE statement and the PROC LOGISTIC step?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Third, you could run an example from the documentation. I took your ODS EXCLUDE statement, followed by the code from &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_logistic_examples01.htm" target="_blank" rel="noopener"&gt;Example 78.1 Stepwise Logistic Regression and Predicted Values&lt;/A&gt;&amp;nbsp;and did &lt;EM&gt;not&lt;/EM&gt; get &lt;FONT face="courier new,courier"&gt;Nobs&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;LackFitPartition&lt;/FONT&gt;, etc. -- as expected.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In principle, you could switch from ODS EXCLUDE to &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsug/p1b72ff70v3obrn16aanp1r9q2bu.htm" target="_blank" rel="noopener"&gt;ODS SELECT&lt;/A&gt; and specify the outputs you do want instead of an exclusion list. But I'd rather use &lt;FONT face="courier new,courier"&gt;ods exclude all;&lt;/FONT&gt; (or, equivalently: &lt;FONT face="courier new,courier"&gt;ods select none;&lt;/FONT&gt;), which should suppress printed output entirely, and then add &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsug/p0oxrbinw6fjuwn1x23qam6dntyd.htm" target="_blank" rel="noopener"&gt;ODS OUTPUT&lt;/A&gt; statements and/or options (such as &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_logistic_syntax01.htm#statug.logistic.logisticoutest" target="_blank" rel="noopener"&gt;OUTEST=&lt;/A&gt;) of the PROC LOGISTIC statement to write all tabular output of interest to &lt;EM&gt;SAS datasets&lt;/EM&gt;. Creating customized tables (using, e.g., PROC REPORT) based on such datasets is a common technique in many practical applications I've seen. Thus you have much better control (than with ODS EXCLUDE/SELECT) over &lt;EM&gt;what&lt;/EM&gt; is displayed and &lt;EM&gt;how&lt;/EM&gt;. The "raw" procedure output would be put into an appendix of the report, if used at all. The only exception to this strategy might be the plots. But most of the selected/not excluded graphs are written to &lt;EM&gt;separate&lt;/EM&gt; PNG files (using &lt;FONT face="courier new,courier"&gt;ods &lt;EM&gt;listing&lt;/EM&gt;&lt;/FONT&gt;; see also the UNPACK option of the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_logistic_syntax01.htm#statug.logistic.logisticplots" target="_blank" rel="noopener"&gt;PLOTS option&lt;/A&gt;) and it should be easy to delete files that are not needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 07 Aug 2021 18:20:25 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2021-08-07T18:20:25Z</dc:date>
    <item>
      <title>Excluding output when using proc logistic with selection = stepwise option</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Excluding-output-when-using-proc-logistic-with-selection/m-p/760163#M240343</link>
      <description>&lt;P&gt;I am running proc logistic with selection = stepwise&amp;nbsp;on the model statement.&lt;BR /&gt;&lt;BR /&gt;Before running this procedure I'm running code to exclude some of the output. I'm finding that in the case of selection equal stepwise that exclusion is not working. I have checked the ods&amp;nbsp;output using ODS trace on. I can't include more details because of the sensitivity of this data but wonder if you can provide any helpful information. I'm finding the exclude feature to be very helpful. The code and a portion of the log I'm using is given below.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods trace on;
ods graphics on;
ods exclude 
Nobs
where = (_path_ ? 'Step0') 
where = (_path_ ? 'Step1')
where = (_path_ ? 'Step2')
ROCCurve
LackFitPartition
influence
influencePlots.'Panel 2'
CalibrationPlot
;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;A portion of the log (stepwise selection) is given below.&lt;/P&gt;
&lt;PRE&gt;Output Added:
 -------------
 Name:       ROCCurve
 Label:      ROC Curve for Selected Model
 Template:   Stat.Logistic.Graphics.ROC
 Path:       Logistic.ROCCurve
 -------------
 
 Output Added:
 -------------
 Name:       ROCOverlay
 Label:      ROC Curve for All Steps
 Template:   Stat.Logistic.Graphics.ROCOverlay
 Path:       Logistic.ROCOverlay
 -------------
 
 Output Added:
 -------------
 Name:       LackFitPartition
 Label:      Partition
 Template:   Stat.Logistic.LackFitPartition
 Path:       Logistic.LackFit.LackFitPartition
 -------------
 
 Output Added:
 -------------
 Name:       LackFitChiSq
 Label:      Chi-Square Test
 Template:   Stat.Logistic.LackFitChiSq
 Path:       Logistic.LackFit.LackFitChiSq
 -------------
 
 Output Added:
 -------------
 Name:       Influence
 Label:      Influence
 Template:   Stat.Logistic.Influence
 Path:       Logistic.Influence
 -------------
 
 Output Added:
 -------------
 Name:       InfluencePlots
 Label:      Panel 1
 Template:   Stat.Logistic.Graphics.InfluencePanel
 Path:       Logistic.InfluencePlots.InfluencePlots
 -------------
 
 Output Added:
 -------------
 Name:       InfluencePlots
 Label:      Panel 2
 Template:   Stat.Logistic.Graphics.InfluencePanel
 Path:       Logistic.InfluencePlots.InfluencePlots
 -------------
 
 Output Added:
 -------------
 Name:       CalibrationPlot
 Label:      Calibration Plot
 Template:   Stat.Logistic.Graphics.CalibrationPlot
 Path:       Logistic.CalibrationPlot
 -------------
&lt;/PRE&gt;
&lt;P&gt;By the way,&amp;nbsp;a rather obvious solution is to run the final model separately. I've been at this place before and I'm just a little stubborn about being able to do it in just one run. Thank you.&lt;BR /&gt;&lt;BR /&gt;Sincerely,&lt;BR /&gt;Mary A. Marion&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Aug 2021 16:41:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Excluding-output-when-using-proc-logistic-with-selection/m-p/760163#M240343</guid>
      <dc:creator>MaryA_Marion</dc:creator>
      <dc:date>2021-08-07T16:41:33Z</dc:date>
    </item>
    <item>
      <title>Re: Excluding output when using proc logistic with selection = stepwise option</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Excluding-output-when-using-proc-logistic-with-selection/m-p/760177#M240351</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/16492"&gt;@MaryA_Marion&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't know why outputs such as&amp;nbsp;&lt;FONT face="courier new,courier"&gt;ROCCurve&lt;/FONT&gt; and&amp;nbsp;&lt;FONT face="courier new,courier"&gt;LackFitPartition&lt;/FONT&gt;, which you have explicitly excluded, would appear in the output. The first thing to check is, of course, the log: Did your ODS EXCLUDE statement run &lt;EM&gt;immediately&lt;/EM&gt; before the PROC LOGISTIC step and there are no errors, warnings or suspicious notes in the log?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The second step, if needed, would be to close the SAS session and run the code in a new session. Do the excluded parts of the output still occur? What does &lt;FONT face="courier new,courier"&gt;ods show;&lt;/FONT&gt;&amp;nbsp;(cf.&amp;nbsp;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsug/n039755ylf7oppn141m3puregz1r.htm" target="_blank" rel="noopener"&gt;documentation&lt;/A&gt;) write to the log if you insert it between the ODS EXCLUDE statement and the PROC LOGISTIC step?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Third, you could run an example from the documentation. I took your ODS EXCLUDE statement, followed by the code from &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_logistic_examples01.htm" target="_blank" rel="noopener"&gt;Example 78.1 Stepwise Logistic Regression and Predicted Values&lt;/A&gt;&amp;nbsp;and did &lt;EM&gt;not&lt;/EM&gt; get &lt;FONT face="courier new,courier"&gt;Nobs&lt;/FONT&gt;, &lt;FONT face="courier new,courier"&gt;LackFitPartition&lt;/FONT&gt;, etc. -- as expected.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;In principle, you could switch from ODS EXCLUDE to &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsug/p1b72ff70v3obrn16aanp1r9q2bu.htm" target="_blank" rel="noopener"&gt;ODS SELECT&lt;/A&gt; and specify the outputs you do want instead of an exclusion list. But I'd rather use &lt;FONT face="courier new,courier"&gt;ods exclude all;&lt;/FONT&gt; (or, equivalently: &lt;FONT face="courier new,courier"&gt;ods select none;&lt;/FONT&gt;), which should suppress printed output entirely, and then add &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/odsug/p0oxrbinw6fjuwn1x23qam6dntyd.htm" target="_blank" rel="noopener"&gt;ODS OUTPUT&lt;/A&gt; statements and/or options (such as &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_logistic_syntax01.htm#statug.logistic.logisticoutest" target="_blank" rel="noopener"&gt;OUTEST=&lt;/A&gt;) of the PROC LOGISTIC statement to write all tabular output of interest to &lt;EM&gt;SAS datasets&lt;/EM&gt;. Creating customized tables (using, e.g., PROC REPORT) based on such datasets is a common technique in many practical applications I've seen. Thus you have much better control (than with ODS EXCLUDE/SELECT) over &lt;EM&gt;what&lt;/EM&gt; is displayed and &lt;EM&gt;how&lt;/EM&gt;. The "raw" procedure output would be put into an appendix of the report, if used at all. The only exception to this strategy might be the plots. But most of the selected/not excluded graphs are written to &lt;EM&gt;separate&lt;/EM&gt; PNG files (using &lt;FONT face="courier new,courier"&gt;ods &lt;EM&gt;listing&lt;/EM&gt;&lt;/FONT&gt;; see also the UNPACK option of the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/statug/statug_logistic_syntax01.htm#statug.logistic.logisticplots" target="_blank" rel="noopener"&gt;PLOTS option&lt;/A&gt;) and it should be easy to delete files that are not needed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Aug 2021 18:20:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Excluding-output-when-using-proc-logistic-with-selection/m-p/760177#M240351</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-08-07T18:20:25Z</dc:date>
    </item>
  </channel>
</rss>

