title: How do I make two subgroups for forest plot in metafor?
body: <p>I am interested in making two subgroups for the forest plot. One of the subgroups would be "Complete" while the other would be "Incomplete." I was hoping to get something similar to one of the examples that metafor gives:</p>
  
  <p><a href="//imgur.com/ZCftelt" rel="nofollow">View post on imgur.com</a></p>
  
  <p>Currently, this is the forest plot I am producing with my code:</p>
  
  <p><a href="//imgur.com/BAaNSlt" rel="nofollow">View post on imgur.com</a></p>
  
  <pre><code>Study &lt;- c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15)
  
  Author &lt;- c('Study 1', 'Study 2', 'Study 3', 'Study 4','Study 5', 'Study 6', 'Study 7', 'Study 8', 'Study 9',
          'Study 10', 'Study 11', 'Study 12', 'Study 13', 'Study 14', 'Study 15')
  
  Year &lt;- c(2014, 2008, 2013, 2013, 2011, 2013, 2013, 2012, 2013, 2012, 2013, 2014, 2014, 2011, 2014)
  
  EffectSize &lt;- c(0.520, 0.110, 0.260, 0.204, 0.443, 0.156, 0.160, 0.280, 0.051, 0.082, 0.268,-0.360, 0.333, 0.519, 0.300)
  
  SampleSize&lt;- c(37, 255, 143, 143, 92, 563, 94, 117, 147, 1352, 368, 28, 52, 21, 48)
  
  Outcome &lt;- c('Incomplete', 'Incomplete', 
           'Completed Some', 'Completed Some', 
           'Completed Some', 'Completed Some', 
           'Completed Some',  'Completed Most', 
           'Completed Most', 'Completed Most', 'Completed Most', 'Complete',
           'Anxiety &amp; Depression', 'Complete', 'Complete')
  
  Allocation &lt;- c('Other', 'Other', 'Other', 'Other', 'Other', 'Other', 'Other', 'Other', 'Other', 'Other', 'Other', 'Complete',
              'Other', 'Complete', 'Complete')
  
  
  meta.data &lt;-data.frame(Study, Author, Year, EffectSize, SampleSize, Outcome, Allocation)
  
  
  Meta.poster &lt;- escalc(measure = "COR", ri = EffectSize, ni = SampleSize, data = meta.data)
  
  meta.random.model &lt;- rma(yi = yi, vi = vi, data = Meta.poster, slab = Author, level = 95)
  
  
  
  fsn(yi, vi, data = Meta.poster)
  
  forest(meta.random.model) #Basic forest plot
  
  forest(meta.random.model, slab = paste(Meta.poster$Author, Meta.poster$Year, sep = ", "))
  
  op &lt;- par(cex = 0.90, font = 2)
  text(-1.45, 16.5, "First Author and Year", pos = 2)
  text(2.65, 16.5, "Effect Size [95% CI]", pos = 2)
  par(op)
  </code></pre>
  
  <p>funnel(meta.random.model</p>