Date: Mon, 20 Mar 2006 14:14:10 -0500
Reply-To: Bob_Abelson@HGSI.COM
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Bob Abelson <Bob_Abelson@HGSI.COM>
Subject: Re: Formatting p-values less than 0.0001
Content-Type: text/plain; charset=us-ascii
Venky,
This works perfectly if I change the nested format to pvalue7.4. Thanks!
Bob Abelson
HGSI
240 314 4400 x1374
bob_abelson@hgsi.com
Venky Chakravarthy <swovcc@HOTMAIL.COM>
03/20/2006 02:04 PM
To: SAS-L@LISTSERV.UGA.EDU, Bob Abelson <Bob_Abelson@HGSI.COM>
cc:
Subject: Re: Formatting p-values less than 0.0001
On Mon, 20 Mar 2006 13:33:33 -0500, Bob Abelson <Bob_Abelson@HGSI.COM>
wrote:
>First let me start by saying I'm stuck with SAS Version 8.2 for now.
>
>I use the pvalue8.4 format to display p-values. We would like to see
>p-values less than 0.0001 displayed as "<0.0001" instead of "<.0001". Is
>that a possibility with the pvalue format?
>
>Thanks,
>
>Bob Abelson
>HGSI
>240 314 4400 x1374
>bob_abelson@hgsi.com
Bob,
Since p values take the range 0-1, you only have small subset to consider
for creating your own format. Would something like this work? Adjust when
you have to conside another w.d.
proc format ;
value mypval 0.0001 - 1 = [pvalue8.4]
0 - <1e-4 = "<0.0001" ;
run ;
data _null_ ;
input x ;
put x = : mypval. ;
cards ;
1
0.01
0.001
0.0001
0.000001
0.00001
run ;