-
-
Save diamonaj/3b6bc83d040098486634184d99fc4c55 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| genout <- GenMatch(Tr=treat, X=X, BalanceMatrix=BalanceMat, estimand="ATT", exact = TRUE, M=1, | |
| pop.size=16, max.generations=10, wait.generations=1) | |
| #The outcome variable | |
| Y=re78/1000 | |
| # | |
| # Now that GenMatch() has found the optimal weights, let's estimate | |
| # our causal effect of interest using those weights | |
| # | |
| mout <- Match(Y=Y, Tr=treat, X=X, Weight.matrix=genout) | |
| summary(mout) | |
| # | |
| #Let's determine if balance has actually been obtained on the variables of interest | |
| # | |
| mb <- MatchBalance(treat~age +educ+black+ hisp+ married+ nodegr+ u74+ u75+ | |
| re75+ re74+ I(re74*re75), | |
| match.out=mout, nboots=500) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment