<?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: %NLMeans part two -How can I enforce the formatting of EST output datasets? in Statistical Procedures</title>
    <link>https://communities.sas.com/t5/Statistical-Procedures/NLMeans-part-two-How-can-I-enforce-the-formatting-of-EST-output/m-p/765484#M37414</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15363"&gt;@SteveDenham&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;(...) The last column has Name: Pr, Label: Pr &amp;gt; ChiSq and Format PVALUE6.&amp;nbsp; However, when viewed in the Enhanced Editor&amp;nbsp; the displayed value in the dataset is a single numeric, either 0 or 1.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It seems that the Viewtable window (which I assume you are using) doesn't recognize the default value for &lt;STRONG&gt;&lt;EM&gt;d&lt;/EM&gt;&lt;/STRONG&gt; in the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/leforinforref/p0pzklcc1zxivxn1js2y5nkg2wq9.htm" target="_blank" rel="noopener"&gt;PVALUE&lt;EM&gt;w.&lt;STRONG&gt;d&lt;/STRONG&gt;&lt;/EM&gt; format&lt;/A&gt;. From the documentation:&lt;/P&gt;
&lt;H4 class="xisDoc-argument"&gt;&lt;EM class="xisDoc-userSuppliedValue"&gt;d&lt;/EM&gt;&lt;/H4&gt;
&lt;DIV class="xisDoc-argumentDescription"&gt;
&lt;P class="xisDoc-paraSimpleFirst"&gt;specifies the number of digits to the right of the decimal point in the numeric value. This argument is optional.&lt;/P&gt;
&lt;SECTION class="xisDoc-tableWrap"&gt;
&lt;TABLE class="xisDoc-summary"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-summaryDefault"&gt;Default&lt;/TH&gt;
&lt;TD class="xisDoc-summaryText"&gt;the minimum of 4 and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM class="xisDoc-userSuppliedValue"&gt;w&lt;/EM&gt;–2&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/SECTION&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, PVALUE6. is actually equivalent to PVALUE6.4. As&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;has suggested, you can change &lt;FONT face="courier new,courier"&gt;pvalue6.&lt;/FONT&gt; to &lt;FONT face="courier new,courier"&gt;pvalue6.4&lt;/FONT&gt;&amp;nbsp;-- it's in line 749 of macro NLEST, current version 1.8:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;           format Pr pvalue6.4;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;At least this works with my test dataset:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
do k=0 to 8;
  P  = 10**-k;
  Pr = P;
  output;
end;
format P pvalue6. Pr pvalue6.4;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Viewtable:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pv_viewtable.png" style="width: 263px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63225iD1C558F60BBFD807/image-size/large?v=v2&amp;amp;px=999" role="button" title="pv_viewtable.png" alt="pv_viewtable.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The&amp;nbsp;&lt;A href="https://support.sas.com/downloads/package.htm?pid=2173" target="_blank" rel="nofollow noopener noreferrer"&gt;SAS Universal Viewer&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;(my preferred tool for viewing datasets) does not have this issue (and you can even toggle between formatted and unformatted values, see screenshot below)&lt;FONT face="helvetica"&gt;:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pv_UniViewer.png" style="width: 540px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63226i16621FC503AE7C85/image-size/large?v=v2&amp;amp;px=999" role="button" title="pv_UniViewer.png" alt="pv_UniViewer.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 01 Sep 2021 19:56:36 GMT</pubDate>
    <dc:creator>FreelanceReinh</dc:creator>
    <dc:date>2021-09-01T19:56:36Z</dc:date>
    <item>
      <title>%NLMeans part two -How can I enforce the formatting of EST output datasets?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/NLMeans-part-two-How-can-I-enforce-the-formatting-of-EST-output/m-p/765461#M37407</link>
      <description>&lt;P&gt;i feel like I am getting the hang of this now, but I have a question about the Est datasets produced.&amp;nbsp; The last column has Name: Pr, Label: Pr &amp;gt; ChiSq and Format PVALUE6.&amp;nbsp; However, when viewed in the Enhanced Editor&amp;nbsp; the displayed value in the dataset is a single numeric, either 0 or 1.&amp;nbsp; No problem in EG.&amp;nbsp; I would like to&amp;nbsp; &amp;nbsp;know a good way to get the variable in the dataset to display in conformance with the format in my default/preferred editor.&amp;nbsp; Or is this something I should report as a bug?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(Yeah, yeah, I know I should just change my environment to something from the 21st century, but like I was going to say above, I am a lazy kind of guy)&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 18:35:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/NLMeans-part-two-How-can-I-enforce-the-formatting-of-EST-output/m-p/765461#M37407</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2021-09-01T18:35:02Z</dc:date>
    </item>
    <item>
      <title>Re: %NLMeans part two -How can I enforce the formatting of EST output datasets?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/NLMeans-part-two-How-can-I-enforce-the-formatting-of-EST-output/m-p/765471#M37408</link>
      <description>&lt;P&gt;I think the correct format should be PVALUE6.4, not PVALUE6. Use PROC CONTENTS to make sure you typed the correct format.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Run this program and open the data set in your SAS Windowing environment. Let me know if you still see the problem:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data EstTest;
format Pr PVALUE6.4;
label Pr = "Pr &amp;gt; ChiSq";
input Pr @@;
Raw = Pr;
datalines;
0.99 0.1 0.05 0.098 0.0054 0.00019 3.21E-5 1.23E-6
;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you can see the EstTest data correctly, and if your data really is using PVALUE6., then this is a bug.&lt;/P&gt;
&lt;P&gt;If this is a SAS-supported macro, make sure you are using the most recent version.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Report back what you observe. If this is a bug, I will alert Tech Support, who will make sure the problem gets fixed.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 19:29:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/NLMeans-part-two-How-can-I-enforce-the-formatting-of-EST-output/m-p/765471#M37408</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-09-01T19:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: %NLMeans part two -How can I enforce the formatting of EST output datasets?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/NLMeans-part-two-How-can-I-enforce-the-formatting-of-EST-output/m-p/765484#M37414</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/15363"&gt;@SteveDenham&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;(...) The last column has Name: Pr, Label: Pr &amp;gt; ChiSq and Format PVALUE6.&amp;nbsp; However, when viewed in the Enhanced Editor&amp;nbsp; the displayed value in the dataset is a single numeric, either 0 or 1.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It seems that the Viewtable window (which I assume you are using) doesn't recognize the default value for &lt;STRONG&gt;&lt;EM&gt;d&lt;/EM&gt;&lt;/STRONG&gt; in the &lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/leforinforref/p0pzklcc1zxivxn1js2y5nkg2wq9.htm" target="_blank" rel="noopener"&gt;PVALUE&lt;EM&gt;w.&lt;STRONG&gt;d&lt;/STRONG&gt;&lt;/EM&gt; format&lt;/A&gt;. From the documentation:&lt;/P&gt;
&lt;H4 class="xisDoc-argument"&gt;&lt;EM class="xisDoc-userSuppliedValue"&gt;d&lt;/EM&gt;&lt;/H4&gt;
&lt;DIV class="xisDoc-argumentDescription"&gt;
&lt;P class="xisDoc-paraSimpleFirst"&gt;specifies the number of digits to the right of the decimal point in the numeric value. This argument is optional.&lt;/P&gt;
&lt;SECTION class="xisDoc-tableWrap"&gt;
&lt;TABLE class="xisDoc-summary"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TH class="xisDoc-summaryDefault"&gt;Default&lt;/TH&gt;
&lt;TD class="xisDoc-summaryText"&gt;the minimum of 4 and&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;EM class="xisDoc-userSuppliedValue"&gt;w&lt;/EM&gt;–2&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;/SECTION&gt;
&lt;/DIV&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, PVALUE6. is actually equivalent to PVALUE6.4. As&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;has suggested, you can change &lt;FONT face="courier new,courier"&gt;pvalue6.&lt;/FONT&gt; to &lt;FONT face="courier new,courier"&gt;pvalue6.4&lt;/FONT&gt;&amp;nbsp;-- it's in line 749 of macro NLEST, current version 1.8:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;           format Pr pvalue6.4;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;At least this works with my test dataset:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
do k=0 to 8;
  P  = 10**-k;
  Pr = P;
  output;
end;
format P pvalue6. Pr pvalue6.4;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Viewtable:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pv_viewtable.png" style="width: 263px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63225iD1C558F60BBFD807/image-size/large?v=v2&amp;amp;px=999" role="button" title="pv_viewtable.png" alt="pv_viewtable.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The&amp;nbsp;&lt;A href="https://support.sas.com/downloads/package.htm?pid=2173" target="_blank" rel="nofollow noopener noreferrer"&gt;SAS Universal Viewer&lt;/A&gt;&lt;SPAN&gt;&amp;nbsp;(my preferred tool for viewing datasets) does not have this issue (and you can even toggle between formatted and unformatted values, see screenshot below)&lt;FONT face="helvetica"&gt;:&lt;/FONT&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="pv_UniViewer.png" style="width: 540px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/63226i16621FC503AE7C85/image-size/large?v=v2&amp;amp;px=999" role="button" title="pv_UniViewer.png" alt="pv_UniViewer.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 19:56:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/NLMeans-part-two-How-can-I-enforce-the-formatting-of-EST-output/m-p/765484#M37414</guid>
      <dc:creator>FreelanceReinh</dc:creator>
      <dc:date>2021-09-01T19:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: %NLMeans part two -How can I enforce the formatting of EST output datasets?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/NLMeans-part-two-How-can-I-enforce-the-formatting-of-EST-output/m-p/765512#M37418</link>
      <description>&lt;P&gt;The PVALUE6. format used by the macros is okay as is. You probably just have p-values that all round to either 0 or 1 when displayed to 4 decimal places. If you want, print the data set using format 10.8 to see the values to more precision.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 21:18:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/NLMeans-part-two-How-can-I-enforce-the-formatting-of-EST-output/m-p/765512#M37418</guid>
      <dc:creator>StatDave</dc:creator>
      <dc:date>2021-09-01T21:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: %NLMeans part two -How can I enforce the formatting of EST output datasets?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/NLMeans-part-two-How-can-I-enforce-the-formatting-of-EST-output/m-p/765515#M37420</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;&amp;nbsp;I respectfully disagree. I can reproduce Steve's observations by using the program that I wrote, but change the FORMAT statement to&lt;/P&gt;
&lt;P&gt;format Pr PVALUE6.;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you run my program in the old SAS Windowing Environment on Windows and then click on the EstTest icon in the Results window to open it in the old VIEWTABLE application, you will see that Steve's comments are correct. The ViewTable only displays 1 or 0 when the format is PVALUE6.&amp;nbsp; If you change the format to PVALUE6.4, then the ViewTable displays the formatted values correctly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Steve, the ViewTable isn't being developed or shipped anymore, so we can't fix the bug there. But maybe Dave knows how to get PVALUE6.4 added to the macro.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 21:58:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/NLMeans-part-two-How-can-I-enforce-the-formatting-of-EST-output/m-p/765515#M37420</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-09-01T21:58:56Z</dc:date>
    </item>
    <item>
      <title>Re: %NLMeans part two -How can I enforce the formatting of EST output datasets?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/NLMeans-part-two-How-can-I-enforce-the-formatting-of-EST-output/m-p/765517#M37421</link>
      <description>&lt;P&gt;I suspect the Viewtable issue may be related to the programming of "default" formats. There is drop down list for formats and informats when you look at column properties from Viewtable by clicking on the column header. PVALUE is not one of the formats in the list, so the expected behavior of displaying 4 decimals wasn't set up by the widget programmer. I think that Pvalue may be the only format that displays decimals by default in other output. So the exception got missed in Viewtable.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 22:23:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/NLMeans-part-two-How-can-I-enforce-the-formatting-of-EST-output/m-p/765517#M37421</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-09-01T22:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: %NLMeans part two -How can I enforce the formatting of EST output datasets?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/NLMeans-part-two-How-can-I-enforce-the-formatting-of-EST-output/m-p/765519#M37423</link>
      <description>&lt;P&gt;Or the ViewTable is so old that the PVALUEw.d format wasn't invented yet! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Sep 2021 22:25:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/NLMeans-part-two-How-can-I-enforce-the-formatting-of-EST-output/m-p/765519#M37423</guid>
      <dc:creator>Rick_SAS</dc:creator>
      <dc:date>2021-09-01T22:25:32Z</dc:date>
    </item>
    <item>
      <title>Re: %NLMeans part two -How can I enforce the formatting of EST output datasets?</title>
      <link>https://communities.sas.com/t5/Statistical-Procedures/NLMeans-part-two-How-can-I-enforce-the-formatting-of-EST-output/m-p/765600#M37429</link>
      <description>&lt;P&gt;From my log, it appears that the version of VIEWTABLE was shipped with:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;NOTE: Copyright (c) 2016 by SAS Institute Inc., Cary, NC, USA.
NOTE: SAS (r) Proprietary Software 9.4 (TS1M6)
      Licensed to CHARLES RIVER LABORATORIES INTERNATIONAL INC, Site 70272434.
NOTE: This session is executing on the X64_10PRO  platform.



NOTE: Analytical products:

      SAS/STAT 15.1
      SAS/ETS 15.1
      SAS/IML 15.1
      SAS/QC 15.1

NOTE: Additional host information:

 X64_10PRO WIN 10.0.19041  Workstation
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;My copy of EG accesses the same installation, but viewing the datasets there accommodates PVALUE6.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SASViewer 9.1 does not format the p value - it looks like it is either BEST12. or 12.10&amp;nbsp; UniViewer toggles between PVALUE6. and Unformatted (likely BEST12.)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And the Results window displays the value, as does a PROC PRINT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The Pvalue6. format rounds to a single digit in my version of TABLEVIEW.&amp;nbsp; Values less than 0.5 are presented as 0, greater than or equal to 0.5 are presented as 1.&lt;/P&gt;
&lt;P&gt;I hesitate to muck around in the source macro code to "fix" this, as the law of unintended consequences almost always seems to prevail.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks to everyone -&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13684"&gt;@Rick_SAS&lt;/a&gt;&amp;nbsp;, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13884"&gt;@ballardw&lt;/a&gt;&amp;nbsp;, &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13633"&gt;@StatDave&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/32733"&gt;@FreelanceReinh&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;SteveDenham&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 02 Sep 2021 11:27:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/Statistical-Procedures/NLMeans-part-two-How-can-I-enforce-the-formatting-of-EST-output/m-p/765600#M37429</guid>
      <dc:creator>SteveDenham</dc:creator>
      <dc:date>2021-09-02T11:27:06Z</dc:date>
    </item>
  </channel>
</rss>

