Displaying the exact p-value

Displaying the exact p-value

by Kristen -
Number of replies: 2

Here is a cool trick I learned from the Stata forum world: 

Use this command to change the number of digits displayed in your p-values: 

set pformat %-5.1e


Here is an example:

webuse nhanes2

regress weight bpsystol


Notice the p-value for bpsystol is 0.000

Now type in the “set pformat” command and run the regression again: 

 set pformat %-5.1e

regress weight bpsystol


Notice that you now get the exact p-value. 

To make this change permanently, type this in your command line: 

 set pformat %-5.1e, permanently


To display 3 decimal places again, type this in your command line: 

 set pformat %5.4f



In reply to Kristen

Re: Displaying the exact p-value

by Eunjeong -
for some reason I still only get 3 decimal points......
does it only apply to regression command?

In reply to Eunjeong

Re: Displaying the exact p-value

by Kristen -

Was this for: 


tab heartatk age2, col chi2



?