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? I am currently using the matchit function in MatchIt in R. For example, in the call:
m.out1 <- matchit(treat ~ age + educ + black + hispan + nodegree + married + re74 + re75, method = "nearest", data = lalonde)
> head(match.data(m.out1))
    treat age educ black hispan married nodegree re74 re75       re78
NSW1     1  37   11     1      0       1        1    0    0  9930.0460
NSW2     1  22    9     0      1       0        1    0    0  3595.8940
NSW3     1  30   12     1      0       0        0    0    0 24909.4500
NSW4     1  27   11     1      0       0        1    0    0  7506.1460
NSW5     1  33    8     1      0       0        1    0    0   289.7899
NSW6     1  22    9     1      0       0        1    0    0  4056.4940
      distance weights
NSW1 0.6387699       1
NSW2 0.2246342       1
NSW3 0.6782439       1
NSW4 0.7763241       1
NSW5 0.7016387       1
NSW6 0.6990699       1

no where does it display which treated units are paired with which control units. It seems to just be a jumble of the original data, but now with some removal of control units that could not be paired. 
I fail to see the purpose of matchit in this case. If I want to find the ATE after matching, how would I go about this?
 A: There are two components to matching: creating matched samples and pairing units.
Creating matched samples involves pruning away individuals in the control group that are dissimilar from units in the treated group. We assign weights of 0 to these pruned units and weights of 1 or more to the remaining units. match.data() creates a new data set that removes everyone with a weight of 0. Effect estimation on the matched sample involves applying these weights in a weighted independent samples t-test of the outcome on the treatment. This is the technique recommended by Stuart (2010) and others, mostly from Rubin's camp.
Pairing units involves creating subsets of the matched sample, where each subset contains at least one treated and at least one control. Effect estimation in a paired sample involves performing a related measures t-test or a regression that accounts for the clustering of units (i.e., either by including pair membership as a fixed or random effect or using them in cluster-robust standard errors). This technique is recommended by Austin (2011) and others, mostly from Rosenbaum's camp.
Propensity score matching yields some controversy here. You perform the act of pairing in order create matched samples, but as I mentioned above, there is debate about whether you should retain the pair membership of the units in your analysis or just use the matched samples and their weights to estimate the treatment effect.
The authors of MatchIt, which include Stuart, recommend using the matched samples approach (not the paired units approach) to estimating treatment effects after matching. Therefore, if you did 1:1 matching without replacement, you can just do a t-test on the remaining units resulting after match.data(). Otherwise, you need to include the weights generated by matchit() in a weighted analysis (which will also work with 1:1 matching without replacement). Regardless, it would be advisable to use robust standard errors, though this hasn't been recommended explicitly in the literature.
However, if you want to move forward with a paired analysis, you will have to do some work. The pair membership is in the m.out1 object, in the match.matrix component. This is a matrix where the row names are the indices of the treated units, and the values in the columns are the indices of the control units that are paired with each treated unit. You can extract the pairs and create the pair subsets with a bit of R finagling, and then run a paired analysis on these pairs. (Note that if you're doing k:1 matching and not all treated units have k matches, there will be NAs in the match.matrix, which can be ignored.)
One final thing to note is that the ATE cannot be estimated from matched data resulting from a call to matchit(). Only the ATT can be estimated. This is because 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.
Edit 2022/01/05:
MatchIt now includes pair membership in the matched dataset for all matching methods that involve pairing. The MatchIt vignettes explain how to incorporate pair membership in effect estimation after matching, which is now considered best practice. Also, the ATE is available for some matching methods (full matching, subclassification, etc.)
