Hi everyone -
I have been exploring the teffects routines and have hit a stumbling block when using the aipw option. My impression is aipw should follow the recipe in Jeff Wooldridge (2010, Chapter 21, pp 930-33) on how aipw teffects are estimated. That is, one should begin by estimating a selection-into-treatment equation and then use this equation to form inverse probability weights using the propensity scores generated from the selection-into-treatment model. For outcomes, one then uses the weights in estimating outcome equations for each treatment.
What I can't figure out is why teffects aipw seems to be reporting the unweighted outcome regressions. That is, suppose I use teffects, aequations as follows:
This gives the results:
To replicate what teffects is doing, I would first run a logit:
with output:
So far, so good - this replicates the TME1 equation from teffects, aequations. So far, so good!
But now, when I generate weights and run both the weighted and the unweighted regressions for, say, the first outcome, I get:
The results for the first regression are:
and for the second regression are:
Oddly (to me anyways) it looks as though teffects, aequations is presenting the unweighted regression under OME1 above, whereas one would think it would report the weighted regression. Have I missed something here about how teffects aipw works, or is this just a reporting convention, or what?
Matthew J. Baker
I have been exploring the teffects routines and have hit a stumbling block when using the aipw option. My impression is aipw should follow the recipe in Jeff Wooldridge (2010, Chapter 21, pp 930-33) on how aipw teffects are estimated. That is, one should begin by estimating a selection-into-treatment equation and then use this equation to form inverse probability weights using the propensity scores generated from the selection-into-treatment model. For outcomes, one then uses the weights in estimating outcome equations for each treatment.
What I can't figure out is why teffects aipw seems to be reporting the unweighted outcome regressions. That is, suppose I use teffects, aequations as follows:
Code:
webuse cattaneo2 teffects aipw (bweight prenatal1 mage) (mbsmoke mmarried medu, logit), aequations
Code:
Iteration 0: EE criterion = 2.105e-23
Iteration 1: EE criterion = 3.723e-26
Treatment-effects estimation Number of obs = 4,642
Estimator : augmented IPW
Outcome model : linear by ML
Treatment model: logit
----------------------------------------------------------------------------------------
| Robust
bweight | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-----------------------+----------------------------------------------------------------
ATE |
mbsmoke |
(smoker vs nonsmoker) | -236.3734 24.27813 -9.74 0.000 -283.9577 -188.7892
-----------------------+----------------------------------------------------------------
POmean |
mbsmoke |
nonsmoker | 3401.113 9.606971 354.03 0.000 3382.284 3419.943
-----------------------+----------------------------------------------------------------
OME0 |
prenatal1 | 95.11727 26.80305 3.55 0.000 42.58425 147.6503
mage | 9.737189 1.824372 5.34 0.000 6.161485 13.31289
_cons | 3073.201 48.65752 63.16 0.000 2977.834 3168.568
-----------------------+----------------------------------------------------------------
OME1 |
prenatal1 | 64.61752 39.69749 1.63 0.104 -13.18813 142.4232
mage | -4.962403 3.850123 -1.29 0.197 -12.5085 2.583699
_cons | 3217.973 93.57647 34.39 0.000 3034.566 3401.379
-----------------------+----------------------------------------------------------------
TME1 |
mmarried | -.9757148 .0842798 -11.58 0.000 -1.1409 -.8105294
medu | -.1352031 .015786 -8.56 0.000 -.166143 -.1042631
_cons | .7946998 .1881658 4.22 0.000 .4259017 1.163498
----------------------------------------------------------------------------------------
Code:
logit mbsmoke mmarried medu
Code:
Iteration 0: log likelihood = -2230.7484
Iteration 1: log likelihood = -2081.3446
Iteration 2: log likelihood = -2074.1003
Iteration 3: log likelihood = -2074.0937
Iteration 4: log likelihood = -2074.0937
Logistic regression Number of obs = 4,642
LR chi2(2) = 313.31
Prob > chi2 = 0.0000
Log likelihood = -2074.0937 Pseudo R2 = 0.0702
------------------------------------------------------------------------------
mbsmoke | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
mmarried | -.9757148 .0823457 -11.85 0.000 -1.137109 -.8143202
medu | -.1352031 .0160605 -8.42 0.000 -.1666811 -.103725
_cons | .7946998 .188828 4.21 0.000 .4246037 1.164796
------------------------------------------------------------------------------
But now, when I generate weights and run both the weighted and the unweighted regressions for, say, the first outcome, I get:
Code:
predict ps, p gen w = 1/ps*mbsmoke + 1/(1-ps)*(1-mbsmoke) reg bweight prenatal1 if mbsmoke reg bweight prenatal1 [pweight=w] if mbsmoke
Code:
Source | SS df MS Number of obs = 864
-------------+---------------------------------- F(2, 861) = 1.79
Model | 1125691.15 2 562845.575 Prob > F = 0.1672
Residual | 270374985 861 314024.373 R-squared = 0.0041
-------------+---------------------------------- Adj R-squared = 0.0018
Total | 271500676 863 314601.015 Root MSE = 560.38
------------------------------------------------------------------------------
bweight | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
prenatal1 | 64.61752 41.8932 1.54 0.123 -17.60723 146.8423
mage | -4.962403 3.65751 -1.36 0.175 -12.14108 2.216276
_cons | 3217.973 93.36708 34.47 0.000 3034.719 3401.226
------------------------------------------------------------------------------
Code:
(sum of wgt is 4.4684e+03)
Linear regression Number of obs = 864
F(2, 861) = 1.48
Prob > F = 0.2288
R-squared = 0.0032
Root MSE = 568.85
------------------------------------------------------------------------------
| Robust
bweight | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
prenatal1 | 64.6658 41.73664 1.55 0.122 -17.25167 146.5833
mage | -4.316677 4.538464 -0.95 0.342 -13.22442 4.591072
_cons | 3228.563 112.0674 28.81 0.000 3008.606 3448.52
------------------------------------------------------------------------------
Matthew J. Baker

Comment