##load the data
data(lalonde)
## Run the ddid2 method on the observational data with no covariates
d1 <- ddid2(re ~ treat, t=1978, tmin1=1975, tname="year",
data=lalonde.psid.panel, idname="id", se=FALSE,
probs=seq(0.05, 0.95, 0.05))
summary(d1)
## Run the ddid2 method on the observational data with covariates
d2 <- ddid2(re ~ treat, t=1978, tmin1=1975, tname="year",
data=lalonde.psid.panel, idname="id", se=FALSE,
xformla=~age + I(age^2) + education + black + hispanic + married + nodegree,
probs=seq(0.05, 0.95, 0.05))
summary(d2)
Run the code above in your browser using DataLab