title: GLMM's for meta-analysis - error using metabin
body: <p>I'm trying to run a generalised linear mixed effects (binomial-normal) meta-analysis for 7 randomised studies, where each study records the presence of an adverse event within the treatment and placebo populations (exposure and control).</p>
  
  <p>To do this, I'm hoping to use the <a href="https://www.rdocumentation.org/packages/meta/versions/4.9-2/topics/metabin" rel="nofollow noreferrer">metabin function</a> (meta package). However, I'm getting an error and I'm not sure why. E.g. running this code:</p>
  
  <pre><code>install.packages('meta')
  # Data
  data&lt;-data.frame(exposure.events=c(11,34,152,4,60,3,25), exposure.population=c(184,152,9500,77,2012,15,60), control.events=c(3,33,4729,133,1441,1,25), control.population=c(184,375,613978,15865,480485,105,238), Study=c("1","2","3","4","5","6","7"))
  # Calling metabin
  metabin(event.e=exposure.events, n.e=exposure.population, event.c=control.events, n.c=control.population, studlab=Study, data=data, method="GLMM",model.glmm = "CM.AL",method.tau = "ML")
  </code></pre>
  
  <p>I get this output:</p>
  
  <blockquote>
    <p>Error in metafor::rma.glmm(ai = event.e[!exclude], n1i = n.e[!exclude],  : 
      Cannot fit ML model.</p>
  </blockquote>
  
  <p>I've also tried calling the rma.glmm function directly (instead of doing this via metabin), but get the same error message. I've also tried reading the <a href="https://rdrr.io/cran/metafor/src/R/rma.glmm.r" rel="nofollow noreferrer">source code for rma.glmm</a> but I'm not sure I understand what's going on. However, I think the issue is related to the third study (the largest), and in particular the size of the control population, as both of the following run smoothly:</p>
  
  <pre><code># Modifying 3rd row's control population
  data&lt;-data.frame(exposure.events=c(11,34,152,4,60,3,25), exposure.population=c(184,152,9500,77,2012,15,60), control.events=c(3,33,4729,133,1441,1,25), control.population=c(184,375,61378,15865,480485,105,238), Study=c("1","2","3","4","5","6","7"))
  metabin(event.e=exposure.events, n.e=exposure.population, event.c=control.events, n.c=control.population, studlab=Study, data=data, method="GLMM",model.glmm = "CM.AL",method.tau = "ML")
  
  # Deleting 3rd row
  data&lt;-data.frame(exposure.events=c(11,34,4,60,3,25), exposure.population=c(184,152,77,2012,15,60), control.events=c(3,33,133,1441,1,25), control.population=c(184,375,15865,480485,105,238), Study=c("1","2","3","4","5","6"))
  metabin(event.e=exposure.events, n.e=exposure.population, event.c=control.events, n.c=control.population, studlab=Study, data=data, method="GLMM",model.glmm = "CM.AL",method.tau = "ML")
  </code></pre>
  
  <p>Is this a convergence problem, and does anyone know if there is any way around this? The only other thing I can find about this error message is for <a href="https://stackoverflow.com/questions/47723944/computing-estimates-with-rma-glmm-error-when-the-2-estimates-are-identical">a problem (and thus solution) which does not apply to me</a>.</p>
  
  <p>Any help would be really appreciated :)</p>