4
$\begingroup$

So when using the GenMatch function to generate optimal weight coefficients for use in the Match() function. What do these values in the weight.matrix represent? For example, if we work through the example from the ?GenMatch example

library(Matching)
data(lalonde)
attach(lalonde)
X = cbind(age, educ, black, hisp, married, nodegr, u74, u75, re75, re74)
BalanceMat <- cbind(age, educ, black, hisp, married, nodegr, u74, u75, re75, re74,
                    I(re74*re75))
genout <- GenMatch(Tr=treat, X=X, BalanceMatrix=BalanceMat, estimand="ATE", M=1,
                   pop.size=16, max.generations=10, wait.generations=1)
genout$Weight.matrix

We get a value of 296.8 for our age variable. What does this number represent, where does it come from/how is it calculated, is it in someway related to the variance of the data?

And leading on from this, how would one alter this age weighting value, such that matching occurs with +-5 years ?

Jasjeet Singh Sekhon wrote the matching package for R, but both reference data contains no description on the weight.matrix

the package release notes and descriptive paper for the Matching package

$\endgroup$

2 Answers 2

1
$\begingroup$

The weight matrix is described in detail on page 6 of the paper you link to. When matching on multiple variables you need some way to combine the different dimensions into a single distance metric that tells you the distance between any two observations. The diagonal of the weight matrix is the relative weight placed on each variable/dimension for that single distance metric, where distance in each variable's dimension is standardized by the SD for that variable. GenMatch uses an evolutionary algorithm to search over different possible weight matrices and selects the one it finds that best minimizes a loss function defined by fit.func. By default GenMatch selects the proposed weight matrix that maximizes the minimum p-value on a balance check of all variables matched on in order to improve overall balance. If you only want matches within a certain distance on a particular variable you can provide a vector to the argument caliper with a cutoff for each variable defined in the SD of that variable.

$\endgroup$
-1
$\begingroup$

If you don't need to impute missing data, I suggest you use the MatchIt package instead since it has solved the whole matching procedure much more seamlessly than Matching, which is quiet cryptical for us who are new to this.

MatchIt package has a nice tutorial in the JSTAT journal and alot of nice discussions on the web to learn from. It is easy to wprk with and offers alot of matching procedures, incl GenMatch.

$\endgroup$
1
  • $\begingroup$ And reading the section on the GenMatch, it quotes 'Genetic matching automates the process of finding a good matching solution (Diamond and Sekhon 2005). The idea is to use a genetic search algorithm to find a set of weights for each covariate such that the a version of optimal balance is achieved after matching. Again the same description that can be found in the Matching package, and no description on how to adjust weight values to allow matching within +- 5 years $\endgroup$
    – lukeg
    Feb 9, 2015 at 7:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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