next up previous contents home.gif
Next: Optimal Matching Up: Examples Previous: Subclassification   Contents


Nearest Neighbor Matching

Nearest neighbor matching selects the $ r$ (default=1) best control matches for each individual in the treatment group (excluding those discarded using the discard option). Matching is done using a distance measure specified by the distance option (default=logit). Matches are chosen for each treated unit one at a time, with the order specified by the m.order command (default=largest to smallest). At each matching step we choose the control unit that is not yet matched but is closest to the treated unit on the distance measure.

Nearest neighbor matching is implemented in MATCHIT using the method = "nearest" option. The following example script can be run by typing demo(nearest):

> m.out <- matchit(treat ~ re74 + re75 + educ + black + hispan + age, 
                   data = lalonde, method = "nearest")



RBuild autobuild user 2011-10-24