Closed sbaross closed 3 years ago
Thank you for letting me know about this! I have fixed it in the development version which you can install from GitHub. It turns out I had already built in a fix for this but forgot to finish the implementation, so it was a quick fix.
When plotting binary categorical data (eg. sex with the values "male" & "female"),
bal.plot()
gives a messageThe dropped category for [variable] will be set to NA.
leading all bars to be plotted as 100%. This doesn't occur if the variable is recoded as 0/1 or if there are 3 or more possible values. I'm using MatchIt to match, I don't know if this behaviour occurs with other packages.I'm using cobalt v4.2.4 & MatchIt v3.0.2.
binary categorical variable (male/female)
The dropped category for sex will be set to NA.
binary numeric variable (0/1)
categorical variable with 3 values (male/female/unknown)