A theory of statistical inference for matching methods in causal research