My dataset of home sales includes covariates such as square_feet which are continuous and others like num_bedrooms which are in [1, 2, 3, 4, 5, ...]. Is it kosher to match units with the Mahalanobis distance between their covariates, or is there another metric I should consider? My textbook on matching uses vanilla Mahalanobis on ordinal data, but the range is [9,10,...,~30].

  • $\begingroup$ What is the purpose of your matching? Is it to estimate a causal effect? $\endgroup$
    – Noah
    Jul 1, 2020 at 18:41
  • $\begingroup$ @Noah Yes, to estimate a causal effect $\endgroup$
    – taurus
    Jul 1, 2020 at 19:58

1 Answer 1


If your goal is to minimize covariate imbalance for the purpose of estimating a causal effect, then you can do whatever it takes to achieve covariate balance. There are no rules except that post-treatment variables (including the outcome) should not be considered while matching. Mahalanobis distance matching might work, but other matching methods may work well too, such as propensity score matching, Euclidean distance matching, or genetic matching, among others. There is no reason not to try several matching methods until you find one that yields sufficient covariate balance without discarding too many units.

Again, because there are no rules, you can enter your ordinal variables into the match however you want, e.g., as if they were continuous or treating them as nominal and using a dummy variable for each category. There are no precise statistical recommendations because the performance of any choice depends on the (unknown) characteristics of your specific dataset. A "recommended practice" that performs well in theory or in simulations may not perform well in your dataset. One of the benefits of matching over some other statistical methods is that you can assess the potential performance of a method without committing to it (i.e., by checking balance).


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.