How can I get more digits for a p-value?
Solution 1
Follow up the tobit command with
est tab, p(%12.10g)
(for example). This ought to work even in pretty old versions of Stata. A little less easy is to write your own output procedure.
Solution 2
Stata 11.1 introduced a set pformat
command that specifies the output format of p-values in coefficient tables. (I don't know about STATA I'm afraid as I think that was discontinued some time in the 1980s).
By the way, you'd probably be better off asking such completely Stata-specific questions on Statalist rather than here.
Solution 3
A lot of times, you can get the utmost precision if you know your p-value by its internal name. I usually type return list
or ereturn list
after nearly every command that I will seriously use, and then grab results that may look like e(p)
or r(p)
or e(p_chi2)
or whatever the scalar that contains the p-value might be.
Related videos on Youtube
![Admin](/assets/logo_square_200-5d0d61d6853298bd2a4fe063103715b4daf2819fc21225efa21dfb93e61952ea.png)
Admin
Updated on June 04, 2022Comments
-
Admin about 2 years
Does someone know an easy way to get Stata to display more than just three digits for the p-value when running a Tobit regression?
Normally Stata reports that the p-value is
.001
or.065
, but I would like to see more digits, for example,.0011123
or.065320
.To be clear, I don't want to (necessarily) alter the way the data is produced in the regression table.
I only want to be able to get Stata to display more digits for those p-values I am interested in.
-
onestop over 13 yearsGood idea. I'd add that -est tab- is an abbreviation (understood by Stata) for the built-in command -estimates table-. That was introduced with the release of Stata 8.0 in 2003.
-
Admin almost 12 yearsWhenever possible, I do this too. However, p-values are not always "left behind" after estimation commands (
ereturn list
). A nice way to get the p-values from those commands is described here (stata-journal.com/sjpdf.html?articlenum=st0137) and uses some basicmata
functions. However, theset pformat
andset tab
solutions are much more convenient.