LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (September 2011, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 19 Sep 2011 21:25:04 +0000
Reply-To:   Mike Rhoads <RHOADSM1@WESTAT.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Mike Rhoads <RHOADSM1@WESTAT.COM>
Subject:   Re: BEST32. format for small decimal numbers
Comments:   To: Lorne Klassen <lk1@ROGERS.COM>
In-Reply-To:   <201109192009.p8JJNei6015789@waikiki.cc.uga.edu>
Content-Type:   text/plain; charset="us-ascii"

The BESTDw.p format doesn't seem to kick into scientific notation like BEST does (or at least not as quickly), so you might try playing around with that some, possibly with a smaller value for w than 32.

But if that doesn't work, the approach you proposed sounds reasonable to me.

Mike Rhoads RhoadsM1@Westat.com

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of Lorne Klassen Sent: Monday, September 19, 2011 4:10 PM To: SAS-L@LISTSERV.UGA.EDU Subject: BEST32. format for small decimal numbers

I'm using the BEST32. format for displaying standard error values in a PROC TABULATE report.

proc format library=work; value SE (default=32) .='x' other=[best32.]; run;

It works well since it chooses the best display for a variety of values such as:

38476362448 475 5 0 0.2 0.015 0.00204 0.0008 0.0000721

But as soon as there's a value that starts in the 6th decimal place or beyond, it displays the value in scientific notation. I never want values to display in scientific notation.

E.g.: 0.00000204 ==> 2.04E-6

One important thing to note is that we first round our SE values to the 7th decimal place. So I don't have to worry about anything beyond 7 decimal places.

Is this the correct way or only way to solve this? Any pitfalls with this? One minor downside is that it will give a trailing zero for certain numbers but that's not a major problem.

proc format library=work; value SE (default=32) .='x' 0<-<0.00001=[9.7] other=[best32.]; run;

Thanks


Back to: Top of message | Previous page | Main SAS-L page