Discussion:
Formatting p-values less than 0.0001
(too old to reply)
Bob Abelson
2006-03-20 18:33:33 UTC
Permalink
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
***@hgsi.com
David L Cassell
2006-03-20 18:57:59 UTC
Permalink
Post by Bob Abelson
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?
Even if you had SAS 9.1.3 I don't think the PVALUEw.d format would do
this.

As I understand it, PVALUE. prints the less-than-.0001 values with no
leading decimal point. That is, if you ask for PVALUEw.d and the
p-value is less than 1E-d then you get "<.0...01" with d-1 zeroes.

So you may have to create your own picture format for this one.

HTH,
David
--
David L. Cassell
mathematical statistician
Design Pathways
3115 NW Norwood Pl.
Corvallis OR 97330

_________________________________________________________________
On the road to retirement? Check out MSN Life Events for advice on how to
get there! http://lifeevents.msn.com/category.aspx?cid=Retirement
Venky Chakravarthy
2006-03-20 19:04:42 UTC
Permalink
Post by Bob Abelson
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,

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 ;
Bob Abelson
2006-03-20 19:14:10 UTC
Permalink
Venky,

This works perfectly if I change the nested format to pvalue7.4. Thanks!

Bob Abelson
HGSI
240 314 4400 x1374
***@hgsi.com




Venky Chakravarthy <***@HOTMAIL.COM>
03/20/2006 02:04 PM


To: SAS-***@LISTSERV.UGA.EDU, Bob Abelson <***@HGSI.COM>
cc:
Subject: Re: Formatting p-values less than 0.0001
Post by Bob Abelson
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,

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 ;
Venky Chakravarthy
2006-03-20 21:24:57 UTC
Permalink
Bob,

I think 6.4 should be sufficient. That is 4 for the places after the
decimal, 1 for the decimal itself and 1 for the integer value. So 6.4 should
suffice.

Venky
Post by Bob Abelson
Venky,
This works perfectly if I change the nested format to pvalue7.4. Thanks!
Bob Abelson
HGSI
240 314 4400 x1374
03/20/2006 02:04 PM
Subject: Re: Formatting p-values less than 0.0001
Post by Bob Abelson
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,
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 ;
Bob Abelson
2006-03-20 21:57:46 UTC
Permalink
Venky,

Actually, it's more of an alignment issue. Since the output will be right
justified, the decimal points will align with 7.4.

Bob Abelson
HGSI
240 314 4400 x1374
***@hgsi.com




Venky Chakravarthy <***@HOTMAIL.COM>
03/20/2006 04:24 PM


To: SAS-***@LISTSERV.UGA.EDU, Bob Abelson <***@HGSI.COM>
cc:
Subject: Re: Formatting p-values less than 0.0001


Bob,

I think 6.4 should be sufficient. That is 4 for the places after the
decimal, 1 for the decimal itself and 1 for the integer value. So 6.4
should
suffice.

Venky
Post by Bob Abelson
Venky,
This works perfectly if I change the nested format to pvalue7.4. Thanks!
Bob Abelson
HGSI
240 314 4400 x1374
03/20/2006 02:04 PM
Subject: Re: Formatting p-values less than 0.0001
Post by Bob Abelson
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,
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 ;
Venky Chakravarthy
2006-03-20 22:17:30 UTC
Permalink
Bob,

I had guessed that you probably wanted a wide enough specification for
proper alignment but I missed counting the place for the less than sign (<).

Venky
Post by Bob Abelson
Venky,
Actually, it's more of an alignment issue. Since the output will be right
justified, the decimal points will align with 7.4.
Bob Abelson
HGSI
240 314 4400 x1374
03/20/2006 04:24 PM
Subject: Re: Formatting p-values less than 0.0001
Bob,
I think 6.4 should be sufficient. That is 4 for the places after the
decimal, 1 for the decimal itself and 1 for the integer value. So 6.4
should
suffice.
Venky
Post by Bob Abelson
Venky,
This works perfectly if I change the nested format to pvalue7.4. Thanks!
Bob Abelson
HGSI
240 314 4400 x1374
03/20/2006 02:04 PM
Subject: Re: Formatting p-values less than 0.0001
Post by Bob Abelson
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,
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 ;
Loading...