Matches each treated unit to its nearest controls under \(\sqrt{(x_i-x_j)'S^{-1}(x_i-x_j)}\). The inverse covariance is what makes the distance invariant to linear rescaling of the covariates – Euclidean matching silently weights by whatever units the columns happen to be in.
Value
list with matches (0-based control indices, -1 where
unmatched), distances, n_unmatched, reuse_max,
mean_distance.
Details
Past roughly eight covariates the distances concentrate: the nearest control is barely nearer than an arbitrary one, and the matching stops meaning anything. Propensity-score matching is the answer there, and the function warns.
