title: Visualization of pre/post matching balance statistics using dotplot
body: <p>To visually display the covariate balance before and after the matching procedure I have written the following code:</p>
  
  <pre><code>library(lattice)
  library(gridExtra)
  
  StandBias.df= data.frame(
    Category= rep(c("A", "B", "C", "D", "E", "F"), 2),
    Groups = factor(c(rep("0", 6), rep("1", 6))),
    Values = c(0.26, 0.4, 0.3, 0.21, 0.6, 0.14, 0.12, -0.04, -0.23, 0.08, 0.14, -0.27))
  
  d1&lt;-dotplot(Category ~Values, data = StandBias.df, groups = Groups,
              main = "Standardized Mean Differences", col = c("black", "grey50"), pch=c(22,15), xlab=NULL,
              key=list(text=list(c("Pre-Matching", "Post-Matching")),
                       points=list(col = c("black", "grey50"), pch=c(22,15)), 
                       space="bottom", border=T))
  
  Ttest.df = data.frame(
    Category= rep(c("A", "B", "C", "D", "E", "F"), 2),
    Groups = factor(c(rep("0", 6), rep("1", 6))),
    Values = c(0.12, 0.02, 0.69, 0.19, 0.05, 0.01, 0.62, 0.77, 0.54, 0.24, 0.92, 0.51))
  
  
  d2&lt;-dotplot(Category ~Values, data = Ttest.df, groups = Groups,
              main = "p-values", col = c("black", "grey50"), pch=c(22,15), xlab=NULL,
              key=list(text=list(c("Pre-Matching", "Post-Matching")),
                       points=list(col = c("black", "grey50"), pch=c(22,15)), 
                       space="bottom", border=T))
  
  grid.arrange(d1,d2,nrow=1)
  </code></pre>
  
  <p><strong>PROBLEM:</strong>
  I would like to add vertical lines at 0.1 for the p-values (d2) and at [-0.25; 0.25] for the standardized mean values (d1) so that we have a visual cutoff for balanced/not balanced.</p>
  
  <p>This it what I tried:
  For d1, I added the following lines after the last line, i.e. </p>
  
  <p>...</p>
  
  <pre><code>space ="bottom", border=T),
  
  panel=function(...){
      panel.abline(v=0.25)
      panel.abline(v=-0.25)}
  )
  </code></pre>
  
  <p>The modified code produces a plot with the requested vertical line(s) but no data points.</p>
  
  <p>Any ideas are highly welcome!</p>
  
  <p>Many thanks.</p>