Announcement

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

  • Where can I find documentation on _b[] and _se[]?

    Hello. I want to see the documentation on _b[varname] and _se[varname] after running the command regress, but I cannot figure out where it is in the manual. I checked the manual on regress posestimation with no luck. My real purpose is to see what other information I can obtain with this type of operator, such as _p[varname].
    I am using STATA 15. Thank you in advance.
    Last edited by Bing Yang; 13 Feb 2023, 10:58.

  • #2
    See the output of
    Code:
    help _b
    at least in Stata 17. If that doesn't do the trick in Stata 15, it's in sections 13.4 and 13.5 of the Stata User's Guide PDF included in your Stata installation and accessible through Stata's Help menu.

    Comment


    • #3
      Hello Bing Yang. If I follow you, you could store r(table) after using -regress-, and then extract whatever information you want from that matrix. E.g.,

      Code:
      . sysuse auto `'
      (1978 automobile data)
      
      .
      . regress mpg weight length
      
            Source |       SS           df       MS      Number of obs   =        74
      -------------+----------------------------------   F(2, 71)        =     69.34
             Model |  1616.08062         2  808.040312   Prob > F        =    0.0000
          Residual |  827.378835        71   11.653223   R-squared       =    0.6614
      -------------+----------------------------------   Adj R-squared   =    0.6519
             Total |  2443.45946        73  33.4720474   Root MSE        =    3.4137
      
      ------------------------------------------------------------------------------
               mpg | Coefficient  Std. err.      t    P>|t|     [95% conf. interval]
      -------------+----------------------------------------------------------------
            weight |  -.0038515    .001586    -2.43   0.018    -.0070138   -.0006891
            length |  -.0795935   .0553577    -1.44   0.155    -.1899736    .0307867
             _cons |   47.88487    6.08787     7.87   0.000       35.746    60.02374
      ------------------------------------------------------------------------------
      
      . * Store the transpose of r(table) as matrix m  
      . matrix m = r(table)'  
      
      . matrix list m
      
      m[3,9]
                       b          se           t      pvalue          ll          ul          df        crit       eform
      weight  -.00385148   .00158598   -2.428452   .01769862  -.00701383  -.00068912          71   1.9939434           0
      length  -.07959347   .05535773  -1.4378023   .15488322  -.18997364   .03078671          71   1.9939434           0
       _cons   47.884873   6.0878703   7.8656199   2.968e-11   35.746005   60.023742          71   1.9939434           0
      
      . * Extract the p-values for weight & length from m
      . display "p-value for weight = " m[1,4]
      p-value for weight = .01769862
      
      . display "p-value for length = " m[2,4]
      p-value for length = .15488322
      Apologies if I've misunderstood your question.
      --
      Bruce Weaver
      Email: [email protected]
      Version: Stata/MP 18.5 (Windows)

      Comment


      • #4
        Thank you, William and Bruce.
        Code:
        help _b
        does the trick. The r(table) is very useful.

        Comment

        Working...
        X