I am trying to calculate weights for inverse probability weighting. For ATE and ATET the process is straightforward. For example in Stata:
predict ps if e(sample)
gen ate=1/ps if treatment==1
replace ate=1/(1-ps) if treatment==0
gen atet=1 if treatment==1
replace atet=ps/(1-ps) if treatment==0
My question is: how can i calculate the weights for the non-treated (ATENT)?
Best Answer
For ATU, the weights on $y_i$ would be $$ w_i = \begin{cases} \frac{1 - \hat p(x_i)}{\hat p(x_i)} & \text{if}\ d_i=1 \\ 1 & \text{if}\ d_i=0, \end{cases} $$ where $d_i$ is the binary treatment indicator.
For ATT/ATET, the weights are $$ w_i = \begin{cases} 1 & \text{if}\ d_i=1 \\ \frac{\hat p(x_i)}{1-\hat p(x_i)} & \text{if}\ d_i=0 \end{cases} $$
For ATE, the weights are $$ w_i = \begin{cases} \frac{1}{\hat p(x_i)} & \text{if}\ d_i=1 \\ \frac{1}{1-\hat p(x_i)} & \text{if}\ d_i=0 \end{cases} $$
You can find these formulas derived on pages 67-69 of Micro-Econometrics for Policy, Program and Treatment Effects by Myoung-jae Lee, except that I broke them into two pieces here.
Here's how I might do this in Stata, with native commands when possible and also by hand with a weighted regression of the outcome on a binary treatment dummy:
This gives the following three effects of maternal smoking on newborn weight: