I'm following this slides for propensity score matching in R and getting the error: "unknown parameters lpha"
This is my code:
data(lalonde, package = 'Matching')
lalonde.formu <- treat ~ age + educ + black + hisp + married + nodegr + re74 + re75
glm1 <- glm(lalonde.formu, family = binomial, data = lalonde)
library(Matching)
ps <- fitted(glm1) # Propensity scores
Y <- lalonde$re78 # Dependent variable, real earnings in 1978
Tr <- lalonde$treat # Treatment indicator
rr <- Match(Y=Y, Tr=Tr, X=ps, M=1, ties=FALSE)
summary(rr) # The default estimate is ATT here
library(granovaGG)
matches <- data.frame(Treat=lalonde[rr$index.treated, 're78'], Control=lalonde[rr$index.control, 're78'])
print(granovagg.ds(matches))
What am I doing wrong?
