Announcement

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

  • using stabilized weights and teffects RA

    Im using manually calculated IPW, stabilized by prevalence of exposure (stabIPW) to achieve adequate balance and overlap .
    I plan to perform a doubly robust RA model to estimate ATE.
    Whilst IPWRA allow for incorporation of manual probability weights I am unclear if it is appropriate to include both the treatment assingment model (calculating IPW) and then including my manual weights as well

    eg teffects ipwra (outcome model) (treatment assignment model) [pw=stabIPW]

    my question is whether teffects ra (outcome equation) (exposure) [pw=IPW] is equivalent to teffects ipwra (outcome model) (treatment assignment model) if the treatment assignment model generating the manual IPW the same?

    Illustration, indicates close but not identical:

    webuse cattaneo2.dta, clear
    codebook _all, compact

    // generate binary birthweight at ~ 90 centile
    su bweight,de
    gen binbwt = 0
    replace binbwt =1 if bweight >=4000
    tab binbwt

    // generate manual IPW (ipw_man )
    logit mbsmoke mmarried mage prenatal1 fbaby medu
    predict phat,pr
    gen man_ipw=.
    replace man_ipw= 1/phat if mbsmoke ==1
    replace man_ipw= 1/(1-phat) if mbsmoke ==0

    // teffects ra weighted by IPW
    teffects ra (binbwt mmarried mage prenatal1 fbaby medu, logit) ///
    (mbsmoke) [pw=man_ipw] ,ate


    Treatment-effects estimation Number of obs = 4,642
    Estimator : regression adjustment
    Outcome model : logit
    Treatment model: none
    ----------------------------------------------------------------------------------------
    | Robust
    binbwt | Coefficient std. err. z P>|z| [95% conf. interval]
    -----------------------+----------------------------------------------------------------
    ATE |
    mbsmoke |
    (Smoker vs Nonsmoker) | -.0558386 .0129927 -4.30 0.000 -.0813037 -.0303735
    -----------------------+----------------------------------------------------------------
    POmean |
    mbsmoke |
    Nonsmoker | .1173439 .0052618 22.30 0.000 .1070309 .1276569
    ----------------------------------------------------------------------------------------



    // teffects ipwa and calculation of ps & ipw
    teffects ipwra (binbwt mmarried mage prenatal1 fbaby medu, logit) ///
    (mbsmoke mmarried mage prenatal1 fbaby medu ) ,ate
    predict te_ps , ps
    gen te_ipw=.
    replace te_ipw= 1/te_ps if mbsmoke ==1
    replace te_ipw= 1/(1-te_ps) if mbsmoke ==0

    Treatment-effects estimation Number of obs = 4,642
    Estimator : IPW regression adjustment
    Outcome model : logit
    Treatment model: logit
    ----------------------------------------------------------------------------------------
    | Robust
    binbwt | Coefficient std. err. z P>|z| [95% conf. interval]
    -----------------------+----------------------------------------------------------------
    ATE |
    mbsmoke |
    (Smoker vs Nonsmoker) | -.0531514 .0145424 -3.65 0.000 -.0816539 -.0246489
    -----------------------+----------------------------------------------------------------
    POmean |
    mbsmoke |
    Nonsmoker | .1192232 .0052657 22.64 0.000 .1089026 .1295439
    ----------------------------------------------------------------------------------------




    // teffects ipwra weighted as well by manual ipw
    teffects ipwra (binbwt mmarried mage prenatal1 fbaby medu, logit) ///
    (mbsmoke mmarried mage prenatal1 fbaby medu ) [pw=man_ipw],ate

    Treatment-effects estimation Number of obs = 4,642
    Estimator : IPW regression adjustment
    Outcome model : logit
    Treatment model: logit
    ----------------------------------------------------------------------------------------
    | Robust
    binbwt | Coefficient std. err. z P>|z| [95% conf. interval]
    -----------------------+----------------------------------------------------------------
    ATE |
    mbsmoke |
    (Smoker vs Nonsmoker) | -.0557366 .0129586 -4.30 0.000 -.081135 -.0303382
    -----------------------+----------------------------------------------------------------
    POmean |
    mbsmoke |
    Nonsmoker | .1171227 .0052589 22.27 0.000 .1068155 .1274299
    ----------------------------------------------------------------------------------------



    // comparison of manual and teffects ps and ipw
    tabstat phat te_ps man_ipw te_ipw, stats(n mean sd min max) col(stat) longstub


    Variable | N Mean SD Min Max
    -------------+--------------------------------------------------
    phat | 4642 .1861267 .1111502 .0587356 .7320087
    te_ps | 4642 .8138733 .1111502 .2679913 .9412644
    man_ipw | 4642 1.972293 1.978859 1.062401 16.82916
    te_ipw | 4642 6.52958 4.15462 1.063175 17.02545
    ----------------------------------------------------------------


    Given the output similarities is teffects ra with manual ipw weights essentially the ipwra 'automated' model?
    Any guidance or advice, especially when using tailored stabilized weights would be appreciated

    with thanks
    Richard Hiscock


Working...
X