Announcement

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

  • Reporting the heckprobit results to Word with the two steps in two columns

    I want to export the results of a heckprobit regression to Word, so that the coefficients for the selection equation are in column 1 and the coefficients for the the outcome equation are in column 2.
    I am indifferent about using esttab or table/collect/putdocx.

    Example:
    Code:
    use https://www.stata-press.com/data/r18/school
    heckprobit private years logptax, select(vote=years loginc logptax)
    esttab .
    I know I can extract the matrix coefficients like this:
    Code:
    matrix b = e(b)' 
    matrix outc = b[1..3,1]   
    matrix list outc
    matrix treat = b[4..7,1]
    matrix list treat
    but I am wondering if there is a smarter way to do this, especially since it seems to be cumbersome to include the other parameters manually again.
    Cheers,
    Felix
    Stata Version: MP 18.0
    OS: Windows 11

  • #2
    estout is from SSC, as you are asked to explain in FAQ Advice #12.


    Code:
    use https://www.stata-press.com/data/r18/school, clear
    heckprobit private years logptax, select(vote=years loginc logptax)
    esttab ., unstack drop(/:) nonumb nomtitles
    Res.:

    Code:
    . esttab ., unstack drop(/:) nonumb nomtitles
    
    --------------------------------------------
                      private            vote   
    --------------------------------------------
    years              -0.114         -0.0168   
                      (-0.78)         (-1.13)   
    
    logptax             0.352          -1.279*  
                       (0.35)         (-2.24)   
    
    loginc                              0.992*  
                                       (2.24)   
    
    _cons              -2.781          -0.546   
                      (-0.40)         (-0.13)   
    --------------------------------------------
    N                      95                   
    --------------------------------------------
    t statistics in parentheses
    * p<0.05, ** p<0.01, *** p<0.001

    Comment

    Working...
    X