statapropensity-score-matching

Export ATT result after psmatch2 command


I need to export the output from the psmatch2 community-contributed command in Stata.

For example:

 psmatch2 treatment var1, neighbor(1) out(depvar)

where treatment is a dummy variable, var1 is the regressor used to estimate the treatment probability (pscore) and depvar is the outcome variable of interest. The matching algorithm is a nearest neighbor matching.

Output:

enter image description here

I tried to export the results with the community-contributed command esttab:

 esttab , cells(b se t)

However, instead of the ATT, I get the difference between treated and controls before matching:

enter image description here


Solution

  • The following works for me:

    use http://cameron.econ.ucdavis.edu/mmabook/nswpsid.dta, clear
    
    psmatch2 TREAT AGE, neighbor(1) out(RE78)
    
    matrix A = ( r(att) \ r(seatt) )
    
    esttab matrix(A)
    
    -------------------------
                            A
                           c1
    -------------------------
    r1              -20276.95
    r2               3224.725
    -------------------------