Announcement

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

  • Margins and estat teffects not matching after eprobit

    I am using eprobit in stata 15.1 to run an endogenous treatment model with binary treatment and binary outcome variables. I am trying to replicate the calculation of the ATET from estat teffects, atet using margins. However, the results only match when the treatment is specified as exogenous and not endogenous. Is there a reason it does not match with the endogenous treatment? Which approach is more likely correct using estat teffects or margins?

    This is code I run for the exogenous treatment and the ATET calculated from margins
    Code:
     eprobit acutehc_all_1yr i.acs##i.cohort_present_opioid $adjust_charlson, extreat(acs, nointeract) vce(robust)
    ...
    margins r(0 1).acs if acs, contrast(effects nowald)
    
    Contrasts of predictive margins
    Model VCE    : Robust
    
    Expression   : Pr(acutehc_all_1yr==1), predict()
    
    ------------------------------------------------------------------------------
                 |            Delta-method
                 |   Contrast   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
             acs |
       (1 vs 0)  |  -.0208889    .032102    -0.65   0.515    -.0838076    .0420297
    ------------------------------------------------------------------------------
    and using estat teffects I calculate the same atet

    Code:
     estat teffects, atet
    
    Predictive margins                              Number of obs     =      1,024
                                                    Subpop. no. obs   =        448
    
    ------------------------------------------------------------------------------
                 |            Unconditional
                 |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    ATET         |
             acs |
       (1 vs 0)  |  -.0208889   .0321058    -0.65   0.515    -.0838151    .0420372
    ------------------------------------------------------------------------------
    however when I specify an endogenous treatment and calculate the ATET with margins

    Code:
    eprobit acutehc_all_1yr i.acs##i.cohort_present_opioid $adjust_charlson, entreat(acs=discharge_weekend $adjust_suds, nointeract) vce(robust)
    ...
    margins r(0 1).acs if (acs==1), contrast(effects nowald)
    
    Contrasts of predictive margins
    Model VCE    : Robust
    
    Expression   : Pr(acutehc_all_1yr==1), predict()
    
    ------------------------------------------------------------------------------
                 |            Delta-method
                 |   Contrast   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
             acs |
       (1 vs 0)  |   -.031926   .2499081    -0.13   0.898     -.521737    .4578849
    ------------------------------------------------------------------------------
    it does not match what I get when using the estat teffects command.

    Code:
    . estat teffects, atet
    
    Predictive margins                              Number of obs     =      1,024
                                                    Subpop. no. obs   =        448
    
    ------------------------------------------------------------------------------
                 |            Unconditional
                 |     Margin   Std. Err.      z    P>|z|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    ATET         |
             acs |
       (1 vs 0)  |   .3896779   .2054155     1.90   0.058     -.012929    .7922848
    ------------------------------------------------------------------------------
    Any insight as to why the ATET from margins and from estat teffects would vary when the treatment is endogenous would be greatly appreciated.

  • #2
    Were you able to find an answer?

    Comment

    Working...
    X