title: How to do a matching with the Mahalanobis distance in with the Matching package
body: <p>I want to do a matching with the Matching-package. Of course, I have the treatment variable which is the first matching criterion. Then I have the second variable (C) which should be considered for the matching using the Mahalanobis distance. The last two variables (D and E) should be matched exactly. Additionally, I have a matrix (R) that contains some exceptions, that must not matched.</p>
  
  <pre><code>Y &lt;- cbind(Sample$A)
  Tr &lt;- cbind(Sample$B)
  X &lt;- cbind(Sample$C, Sample$D, Sample$E)
  
  Matching_out &lt;- Match(Y = Y, Tr = Tr, X = X, M = 2, replace = TRUE, ties = TRUE,
                    exact=c(0,1,1), restrict = R, Weight = 2)
  summary(Matching_out)
  
  MatchBalance(Tr ~ X, match.out = Matching_out, nboots = 1000, data = Sample)
  </code></pre>
  
  <p>I used "Weight = 2" in the formula because in the package description it says that this is the mahalanobis distance. But there is no difference in the case that I include this part to the code or not.</p>
  
  <p>Does anyone knows how to do this matching with Mahalanobis distance for variable C and excat matching for variables D and E?</p>
  
  <p>Also, does anyone knows what kind of matching this function uses, if I skip this part ("Weight = 2") in the function? Is it full matching, genetic matching, nearest neighbor matching? Or maybe what kind of distance the matching uses for the variable C?</p>
  
  <p>Thank you</p>