data("card")
north <- card[card$south==0,]
white <- card[card$black==0,]
## use the function to plot the data
bivar_data<-sampcompR::biv_compare(dfs = c("north","white"),
benchmarks = c("card","card"),
variables= c("age","educ","fatheduc","motheduc","wage","IQ"),
data=TRUE)
table1<-sampcompR::biv_bias_per_variable(bivar_data,type="rel_diff",
final_col="average",ndigits=2)
noquote(table1)
table2<-sampcompR::biv_bias_per_variable(bivar_data,type = "diff",
final_col="difference",ndigits=2)
noquote(table2)
Run the code above in your browser using DataLab