MatchingFrontier is a powerful and easy-to-use R Package for estimating causal effects by an improved method of matching. In the social sciences and elsewhere, matching methods are commonly used to reduce bias and model dependence by controlling for confounding variables. Yet despite their popularity, common matching approaches leave researchers with two fundamental tensions. First, the methods are designed to maximize one metric (such as propensity score or Mahalanobis distance) but are judged against another for which they were not designed (such as L1 or differences in means). Second, they lack a principled solution to optimizing the implicit bias-variance trade off: they need to optimize with respect to both imbalance (between the treated and control groups) and the number of observations pruned, but existing methods all use manual, and thus suboptimal, approaches for one of the these two key factors.

MatchingFrontier resolves both of these tensions, and in so doing, consolidates previous techniques into a single coherent and flexible approach to matching for causal inference. MatchingFrontier calculates and returns the set of matching solutions with maximum balance for each possible sample size (N, N - 1, N - 2,...), and from those solutions, from which users can easily choose one, several, or all with which to conduct their final analysis. MatchingFrontier is flexible, in that it permits users to use their preferred metric and quantity of interest in the calculation of the frontier. And finally, MatchingFrontier solves the obvious joint optimization problem in one run, automatically, without manual adjustments; for each subset size k, there exist N choose k unique subsets, the majority of which are not optimal with respect to the given metric. MatchingFrontierprovides powerful and fast algorithms that are able to conduct this optimization in seconds.