Using calipers in GenMatch to enourage more pairs

假如想象 提交于 2019-12-12 02:19:39

问题


So following the example from the Matching package and in particular the GenMatch example

Link to package here

Following the example in GenMatch

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$matches
genout$ecaliper

Y=re78/1000

mout <- Match(Y=Y, Tr=treat, X=X, Weight.matrix=genout)
summary(mout)

We see 185 treated observation are paired with 270 non-treatment observation. Now we want to relax this to allow for more flexible pairing on the age criteria.

We can generate a table with the teatment cases and their age on the left and the control case and age on the right by:

pairs <- data.frame(mout$index.treated, lalonde$age[mout$index.treated], mout$index.control, lalonde$age[mout$index.control])

Now using the caliper function of the Match() we should be able to generate a more relaxed match.

We see that sd(lalonde$age) gives us a SD of 7 years for our table, so lets try and match for this limit. Would one simply

mout2 <- Match(Y=Y, Tr=treat, X=X, Weight.matrix=genout, caliper=c(1,0,0,0,0,0,0,0,0,0))
summary(mout2)

it appear not because less Matched number of observations have occured in mout2 than mout1.

So where have I gone wrong? The values of zero must be included in caliper or else an error is returned if they are blank


回答1:


Your first call to GenMatch did not impose any caliper. Your second call imposed a caliper so the number of matches will decrease. If you want to increase the number of matches in your first call, see the "M" option. You probably want something like 1-to-2 matching, etc.



来源:https://stackoverflow.com/questions/30258560/using-calipers-in-genmatch-to-enourage-more-pairs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!