<?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: How to format output table from proc logistic in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-format-output-table-from-proc-logistic/m-p/775682#M246580</link>
    <description>&lt;P&gt;Easiest is likely to send the output of the tables to a data set. Then you can use a data step or other report tools to modify appearance. Look up ODS OUTPUT to send output table(s) to data sets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise you have to find the SAS template that controls the appearance of that table and modify the template.&lt;/P&gt;</description>
    <pubDate>Thu, 21 Oct 2021 16:10:45 GMT</pubDate>
    <dc:creator>ballardw</dc:creator>
    <dc:date>2021-10-21T16:10:45Z</dc:date>
    <item>
      <title>How to format output table from proc logistic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-format-output-table-from-proc-logistic/m-p/775679#M246579</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to format my output variables after running proc logistic. SAS is automatically giving me "scorad_scratch mild vs none" and I want it to just say "mild vs none". I have tried to use proc format, however, it is not following my custom format. Any help would be appreciated. I am using SAS studio. I have also tried if then statement as well which did not work.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="schatr2_0-1634830332093.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64919i62B2A816936BE931/image-size/medium?v=v2&amp;amp;px=400" role="button" title="schatr2_0-1634830332093.png" alt="schatr2_0-1634830332093.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="schatr2_1-1634830418619.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64920i5BE3F25AAA087644/image-size/medium?v=v2&amp;amp;px=400" role="button" title="schatr2_1-1634830418619.png" alt="schatr2_1-1634830418619.png" /&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="schatr2_2-1634830450462.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64921iECAED94390D43893/image-size/medium?v=v2&amp;amp;px=400" role="button" title="schatr2_2-1634830450462.png" alt="schatr2_2-1634830450462.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="schatr2_0-1634830660298.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64923i322B7F998302A346/image-size/medium?v=v2&amp;amp;px=400" role="button" title="schatr2_0-1634830660298.png" alt="schatr2_0-1634830660298.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="schatr2_3-1634830489332.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/64922iD59EB218B7EF17E4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="schatr2_3-1634830489332.png" alt="schatr2_3-1634830489332.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 15:37:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-format-output-table-from-proc-logistic/m-p/775679#M246579</guid>
      <dc:creator>393310</dc:creator>
      <dc:date>2021-10-21T15:37:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to format output table from proc logistic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-format-output-table-from-proc-logistic/m-p/775682#M246580</link>
      <description>&lt;P&gt;Easiest is likely to send the output of the tables to a data set. Then you can use a data step or other report tools to modify appearance. Look up ODS OUTPUT to send output table(s) to data sets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise you have to find the SAS template that controls the appearance of that table and modify the template.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 16:10:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-format-output-table-from-proc-logistic/m-p/775682#M246580</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-10-21T16:10:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to format output table from proc logistic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-format-output-table-from-proc-logistic/m-p/775690#M246582</link>
      <description>&lt;P&gt;Here's some instructions and explanations on how to capture output that is shown via ODS. &lt;BR /&gt;&lt;A href="https://blogs.sas.com/content/sastraining/2017/03/31/capturing-output-from-any-procedure-with-an-ods-output-statement/" target="_blank"&gt;https://blogs.sas.com/content/sastraining/2017/03/31/capturing-output-from-any-procedure-with-an-ods-output-statement/&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 16:34:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-format-output-table-from-proc-logistic/m-p/775690#M246582</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-10-21T16:34:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to format output table from proc logistic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-format-output-table-from-proc-logistic/m-p/775692#M246583</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/393310"&gt;@393310&lt;/a&gt;&amp;nbsp;and welcome to the SAS Support Communities!&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/393310"&gt;@393310&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;SAS is automatically giving me "scorad_scratch mild vs none" and I want it to just say "mild vs none". I have tried to use proc format, however, it is not following my custom format. (...) I have also tried if then statement as well which did not work.&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;The reason in both cases is that the strings contained in variable &lt;FONT face="courier new,courier"&gt;Effect&lt;/FONT&gt; are:&lt;/P&gt;
&lt;PRE&gt;scorad_scratch mild     vs none
scorad_scratch moderate vs none
scorad_scratch severe   vs none&lt;/PRE&gt;
&lt;P&gt;The string in question contains&amp;nbsp;&lt;EM&gt;five&lt;/EM&gt; blanks between "&lt;FONT face="courier new,courier"&gt;mild&lt;/FONT&gt;" and "&lt;FONT face="courier new,courier"&gt;vs none&lt;/FONT&gt;", but HTML output compresses multiple blanks to one. [That's one of many reasons why I prefer Listing output.]&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So you need to insert the four missing blanks in your VALUE statement. Moreover, your format &lt;FONT face="courier new,courier"&gt;$effects&lt;/FONT&gt; has default length 12 (= length of the label "&lt;FONT face="courier new,courier"&gt;mild vs none&lt;/FONT&gt;"), which leads to truncation of the other values (although they are unformatted otherwise). To avoid this, you should either add an explicit length specification in the FORMAT statement (of the PROC PRINT step) -- &lt;FONT face="courier new,courier"&gt;$effects&lt;EM&gt;&lt;STRONG&gt;31&lt;/STRONG&gt;&lt;/EM&gt;.&lt;/FONT&gt; -- or define a sufficient default length in the VALUE statement:&lt;/P&gt;
&lt;PRE&gt;value $effects &lt;STRONG&gt;(default=31)&lt;/STRONG&gt;
'scorad_scratch mild     vs none' = 'mild vs none';&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 16:38:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-format-output-table-from-proc-logistic/m-p/775692#M246583</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-10-21T16:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to format output table from proc logistic</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-format-output-table-from-proc-logistic/m-p/775695#M246585</link>
      <description>&lt;P&gt;This worked perfectly, thank you so much!!&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2021 16:48:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-format-output-table-from-proc-logistic/m-p/775695#M246585</guid>
      <dc:creator>393310</dc:creator>
      <dc:date>2021-10-21T16:48:48Z</dc:date>
    </item>
  </channel>
</rss>

