# NOT RUN {
# Load example dataset, see help(FoxDebate) for details
data(FoxDebate)
# Matrix of covariates
covmat <- with(FoxDebate, cbind(partyid, pnintst, watchnat, educad, readnews,
gender, income, white))
# Estimate compliance scores with covariates, assuming (default)
# case of two-sided non-compliance
cscoreout <- with(FoxDebate, compliance.score(D = watchpro, Z = conditn,
W = covmat))
# Extract vector of estimated compliance scores
cscore <- cscoreout$C.score
summary(cscore)
# }
Run the code above in your browser using DataLab