rcobalt

Multiple threshold lines with love plot R


Is there a way to add multiple threshold lines to the love.plot below? Also, I can't seem to figure out how to suppress the NA variables from being displayed.

love.plot(bal.tab(gac_status ~ covs, data = new_data),
          binary = "std",
          sample.names = "Difference",
          title = "Covariate Balance \n Mean Treated minus Mean Control",
          position = "none",
          stars = "raw",
          drop.missing = TRUE,
          thresholds = c(m = 0.1)) +
         labs(caption = "* indicates variables for which the displayed value is the raw (unstandardized) difference in means.")

I tried thresholds = c(m=c(0.1,0.05)) but that didn't work.

enter image description here


Solution

  • It's a ggplot object so + geom_vline(xintercept = ...) works.