#load the data
data(icu.data)
#the covariate matrix is
X = as.matrix(subset(icu.data, select = -c(open_bin, icu_bed)))
#the treatment
D = icu.data$icu_bed
#the instrument
Z = icu.data$open_bin
#the subclass
subclass = icu.data$site
#make distribution plot of sqrt(MD) for
#complete randomization, block randomization, and bernoulli trials
#(just uncomment the code below)
#distributionBalancePlot(X = X, D = D, Z = Z, subclass = subclass,
#complete = TRUE, blocked = TRUE, bernoulli = TRUE, perms = 500)
Run the code above in your browser using DataLab