diff.means.results = as.data.frame(matrix(NA, nrow=3, ncol=length(covs)))
names(diff.means.results) = covs
row.names(diff.means.results) = c("Raw", "Subclassification (after trimming)", "Subclassification (no trimming)")
diff.means.results[1,] = round(subclass.balance(x, dat$Hydroxychloroquine, subclass = subclass),2)[1,]
diff.means.results[2,1:5]= round(subclass.balance(x.trimmed, trimmed.dat$Hydroxychloroquine, subclass = subclass),2)[2,]
diff.means.results[3,] = round(subclass.balance(x, dat$Hydroxychloroquine, subclass = subclass),2)[2,]
kable(diff.means.results)
Raw |
13.83 |
-0.07 |
0.16 |
0.18 |
-0.03 |
-0.15 |
Subclassification (after trimming) |
1.43 |
-0.04 |
0.50 |
-0.20 |
0.20 |
NA |
Subclassification (no trimming) |
8.94 |
-0.01 |
-0.05 |
0.13 |
-0.08 |
-0.05 |