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:
I know I can extract the matrix coefficients like this:
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.
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 .
Code:
matrix b = e(b)' matrix outc = b[1..3,1] matrix list outc matrix treat = b[4..7,1] matrix list treat
Comment