It has been known that we can not get ATE from MatchIt
package with method = "nearest"
in R because What is the purpose of using MatchIt in R with nearest neighbors for estimation of ATE if it does not report which pairs are matched? said that "the covariate distribution of the matched samples will be similar to that of the treated group, and therefore the estimated effect is not generalizable to the population at large".
And also when I used Matching
package in R with estimand="ATE"
in 1:1 nearest neighbor matching, it calls
Warning message:
In Match(Y = example$death, Tr = example$trt, X = example$ps, M = 1, :
replace==FALSE, but there are more (weighted) control obs than treated obs. Some control obs will not be matched. You may want to estimate ATT instead.
and the matched data seemed wrong.
But when we use psmatch2
and teffects psmatch
in stata, ATE can be output smoothly.
So what exactly is the ATE in stata output and how is it generated algebraically?