How can I get more digits for a p-value?

14,971

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.

Share:
14,971

Related videos on Youtube

Admin
Author by

Admin

Updated on June 04, 2022

Comments

  • Admin
    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
    onestop over 13 years
    Good 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
    Admin almost 12 years
    Whenever 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 basic mata functions. However, the set pformat and set tab solutions are much more convenient.