Announcement

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

  • How can I get "Prob > F" value in a regression? no such e( )...

    Hello there, I would like to extract the "Prob > F" value from a regression (i.e., 0.0000 in the table below) and store it in a macro. But such value is not stored in any e( ) according to the help file of -regress-. Can anyone teach me how to do it? Thanks


    Code:
          Source |       SS           df       MS      Number of obs   =       245
    -------------+----------------------------------   F(3, 241)       =    114.17
           Model |  188.698019         3  62.8993396   Prob > F        =    0.0000
        Residual |  132.773189       241  .550926095   R-squared       =    0.5870
    -------------+----------------------------------   Adj R-squared   =    0.5818
           Total |  321.471208       244  1.31750495   Root MSE        =    .74224
    
    ------------------------------------------------------------------------------
               y |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
               x |   .4694491   .0581572     8.07   0.000     .3548878    .5840104
               w |  -.1492643   .0344163    -4.34   0.000    -.2170595   -.0814692
               z |   .3358211   .0546759     6.14   0.000     .2281175    .4435247
           _cons |   3.035374   .0474202    64.01   0.000     2.941963    3.128785
    ------------------------------------------------------------------------------
    Last edited by Victor Smith; 22 Feb 2018, 10:21.

  • #2
    Code:
    local p_value = Ftail(e(df_m), e(df_r), e(F))

    Comment


    • #3
      Also,

      SJ-14-1 st0332 . . . . . . Stata tip 116: Where did my p-values go? (Part 3)
      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . M. L. Buis
      Q1/14 SJ 14(1):218--220 (no commands)
      discusses how to recover the standard errors for back-
      transformed parameters (standard deviation and correlation)

      SJ-12-4 st0280 . . . . . . Stata tip 112: Where did my p-values go? (Part 2)
      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . M. L. Buis
      Q4/12 SJ 12(4):759--760 (no commands)
      shows how p-values can be recovered for other tests that
      are sometimes displayed by estimation commands

      SJ-7-4 st0137 . . . . . . . . . . . Stata tip 53: Where did my p-values go?
      . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . M. L. Buis
      Q4/07 SJ 7(4):584--586 (no commands)
      tip on calculating the t statistic, p-values, and
      confidence intervals using returned results

      Comment


      • #4
        Adding to the arsenal,

        Code:
        webuse nhanes2f, clear
        reg health weight
        testparm *
        local fprob = r(p)
        di `fprob'
        -------------------------------------------
        Richard Williams, Notre Dame Dept of Sociology
        Stata Version: 17.0 MP (2 processor)

        EMAIL: [email protected]
        WWW: https://www3.nd.edu/~rwilliam

        Comment


        • #5
          Thanks all! Problem solved!

          Comment

          Working...
          X