help for teffects2 aipw

Title

teffects2 aipw -- Augmented inverse probability weighting

Syntax

teffects2 aipw
(ovar omvarlist)
(tvar tmvarlist
[, tmodel])
[if] [in]
[weight]
[,
stat
options]

ovar is an outcome of interest.

omvarlist specifies the covariates in the outcome model.

tvar is a binary treatment variable.

tmvarlist specifies the covariates in the propensity score model.

tmodel

Model
ipt estimate the logit model using
inverse probability tilting (IPT), as in Egel et al. (2008)
and Graham et al. (2012, 2016); the default

logit estimate the logit model using
maximum likelihood (ML), as in teffects

cbps estimate the logit model using
the covariate balancing propensity score (CBPS) approach
of Imai and Ratkovic (2014); only available for the ATE

tmodel specifies the model and estimation
method for the propensity score.

stat

Stat
ate estimate the average
treatment effect (ATE); the default

atet estimate the average
treatment effect on the treated (ATT)

SE/Robust
vce(vcetype) vcetype may be
robust or cluster clustvar

Normalization
nrm IPW weights are ex-post
normalized to add up to one

unnrm IPW weights are not normalized;
the default

GMM options
iterate(#) perform maximum of # iterations

technique() optimization
technique; gn (the default), nr,
dfp, and bfgs are allowed

Advanced
pstolerance(#) set tolerance for overlap
assumption; default is pstolerance(1e-5)

osample(newvar) newvar identifies
observations that violate the overlap assumption

omvarlist and tmvarlist may contain
factor variables; see fvvarlists.

pweights are allowed; see weight.

Description

teffects2 aipw estimates the average treatment effect (ATE)
and the average treatment effect on the treated (ATT) from observational
data by augmented inverse probability weighting (AIPW). AIPW estimators use
estimated probability weights to correct for the missing data on the potential
outcomes as well as (in this implementation) linear regression models for
potential outcome means. AIPW estimators have the double robustness
property. teffects2 aipw also reports an estimate of the average
untreated outcome (when estimating the ATE) or the average untreated outcome
for the treated (when estimating the ATT). This estimate is referred to
as POmean.

Unlike teffects aipw, teffects2 aipw allows for estimation
of the propensity score using the inverse probability tilting (IPT) estimator of
Egel, Graham, and Pinto (2008) and Graham, Pinto, and Egel (2012, 2016), as well
as the covariate balancing propensity score (CBPS) approach of Imai and Ratkovic
(2014). When estimating the ATT, the two approaches are equivalent. Thus,
cbps may only be chosen for tmodel when estimating the ATE.

As shown by Słoczyński, Uysal, and Wooldridge (2025), IPT is associated with
several numerical equivalences between IPW, AIPW, and IPWRA estimators. Also,
the IPT weights are automatically normalized, which implies that the nrm
and unnrm options have no effect when ipt is chosen for tmodel.

teffects2 aipw will determine that the overlap assumption is violated
and will exit with an error if an observation has an estimated propensity score
smaller than that specified by pstolerance() when estimating the ATE or larger
than one minus that specified by pstolerance() when estimating the ATE or ATT.

This is a companion software package for Słoczyński, Uysal, and Wooldridge (2025).
Please cite this paper if you use teffects2 aipw in your work.

References

Egel, Daniel, Bryan S. Graham, and Cristine Campos de Xavier Pinto (2008). "Inverse
Probability Tilting and Missing Data Problems." NBER Working Paper No. 13981.

Graham, Bryan S., Cristine Campos de Xavier Pinto, and Daniel Egel (2012). "Inverse
Probability Tilting for Moment Condition Models with Missing
Data." Review of Economic Studies 79(3), 1053–1079.

Graham, Bryan S., Cristine Campos de Xavier Pinto, and Daniel Egel (2016). "Efficient
Estimation of Data Combination Models by the Method of Auxiliary-to-Study Tilting
(AST)." Journal of Business & Economic Statistics 34(2), 288–301.

Imai, Kosuke, and Marc Ratkovic (2014). "Covariate Balancing Propensity
Score." Journal of the Royal Statistical Society, Series B 76(1), 243–263.

Słoczyński, Tymon, S. Derya Uysal, and Jeffrey M. Wooldridge (2025). "Covariate
Balancing and the Equivalence of Weighting and Doubly Robust Estimators of Average
Treatment Effects." arXiv preprint arXiv:2310.18563.
Available at https://arxiv.org/abs/2310.18563.

Examples

. use https://tslocz.github.io/lalonde.dta, clear

. keep if (dataset==0 | dataset==4) & treated==0

. replace treated = 1 if dataset==0

. teffects2 aipw (diff age educ re74 nodegree married black hispanic) (treated age educ re74 nodegree married black hispanic), atet

. teffects2 aipw (diff age educ re74 nodegree married black hispanic) (treated age educ re74 nodegree married black hispanic, logit), atet

Stored results

teffects2 aipw stores the following in e():

Scalars

e(N) number of observations

e(N_clust) number of clusters

Macros

e(cmd) teffects2

e(depvar) name of outcome variable

e(tvar) name of treatment variable

e(subcmd) aipw

e(tmodel) ipt, logit, or cbps

e(omodel) linear

e(stat) statistic estimated, ate or atet

e(statnorm) normalization option implemented, nrm or unnrm

e(title) title in estimation output

e(clustvar) name of cluster variable

e(vce) vcetype specified in vce()

e(vcetype) title used to label Std. err.

e(properties) b V

Matrices

e(b) coefficient vector

e(V) variance-covariance matrix of the estimators

Functions

e(sample) marks estimation sample

Acknowledgments

Portions of the code are adapted from official Stata code (StataCorp LLC)
and redistributed under the Stata EULA for use with Stata.

License

This package is licensed under the MIT License. See the LICENSE
file included with the distribution.

Authors

Derya Uysal, LMU Munich

Email: derya.uysal@econ.lmu.de

Tymon Słoczyński, Brandeis University

Email: tslocz@brandeis.edu

Jeffrey M. Wooldridge, Michigan State University

Email: wooldri1@msu.edu