Hi,

I want to compute ate and atet using inverse probability weighting (ipw).

So I use a Stata example:

use http://www.stata-press.com/data/r15/cattaneo2
teffects ipw (bweight) (mbsmoke mmarried c.mage##c.mage fbaby medu, probit)

This gives me an ATE of -230.6886

Now I want to replicate what Stata is doing for me:

qui probit mbsmoke mmarried c.mage##c.mage fbaby medu
predict ps_score
gen a=((mbsmoke-ps_score)*bweight)/(ps_score*(1-ps_score))
tabsat a, stats(mean)

This gives me an ATE of -313.0509.

So I am not quite sure what teffects ipw exactly is doing. I can see that it gives me the same propensity score by using the post command predict, pr - but I can not obtain the ipw to se what is going wrong.

Hope someone can help

Peter