Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to extract regression model p-value (Prob > F) and store it in a macro?

    Hello statalisters,

    This question has already been probably asked, but I couldn't find the way to figure it out, sorry.

    My problem is that this p-value is not stored in the postestimates (e(...)) nor the r(table). I've also found that there is this parmby parmest package that I installed, but
    Code:
    parmest, list(p)
    is not helping me (I could have this with r(table)).

    Thank you for your kind help

  • #2
    the p-value is stored in r(table) - it is in row 4 and marked as "pvalue"

    Comment


    • #3
      Thank you, but I want actually is the (prob > F) => the probability which is associated with the F statistic displayed in the upper right corner below F(df1, df2) and above R-squared.

      Comment


      • #4
        yes, sorry about that - I tried to cancel it before it posted but, of course, failed

        note that the numerator df, the denominator df and the value of F are all in -ereturn list-; you could then use the appropriate prob density function (see -h function-) to get the p-value

        Comment


        • #5
          Great, thanks Rich. Btw it's
          Code:
           Ftail(df1,df2,F-stat)
          for the ones who want to know.

          Comment


          • #6
            Also see: M.L. Buis (2014) "Stata tip 116: Where did my p-values go? (part 3)", The Stata Journal, 14(1) pp. 218-220.
            ---------------------------------
            Maarten L. Buis
            University of Konstanz
            Department of history and sociology
            box 40
            78457 Konstanz
            Germany
            http://www.maartenbuis.nl
            ---------------------------------

            Comment


            • #7
              Thank you Maarten, I'll check it out

              Comment


              • #8
                Sorry for bumping an old thread, but for those looking, it's actually part 2 of the "where did my p-values go" that has the direct answer to this question (F-test pvals after regression)

                Here's the link: M.L. Buis (2007) Stata tip 112: Where did my p-values go? (part 2)

                And the code:
                Code:
                Ftail(e(df_m), e(df_r), e(F))

                Comment

                Working...
                X