# NOT RUN {
### default synthesis of selected variables
vars <- c("sex","age","edu","placesize","socprof","marital","income","ls","smoke")
ods <- SD2011[1:1000, vars]
s1 <- syn(ods, m = 2)
### categorical var
multi.compare(s1, ods, var = "smoke", by = c("marital","sex"))
multi.compare(s1, ods, var = "smoke", by = c("sex","edu"), barplot.position = "dodge", msel = 1:2)
### numeric var
multi.compare(s1, ods, var = "age", by = "marital", binwidth = 10)
multi.compare(s1, ods, var = "age", by = c("sex"), y.hist = "density", binwidth = 5)
multi.compare(s1, ods, var = "age", by = c("sex", "marital"), cont.type = "boxplot", msel = 2)
# }
Run the code above in your browser using DataLab