#load the data
data(icu.data)
#the covariate matrix is
X = as.matrix(subset(icu.data, select = -c(open_bin, icu_bed)))
#standardized covariate mean differences across the treatment
getStandardizedCovMeanDiffs(X = X, indicator = icu.data$icu_bed)
#standardized covariate mean differences across the instrument
getStandardizedCovMeanDiffs(X = X, indicator = icu.data$open_bin)
Run the code above in your browser using DataLab