[R-meta] Cannot fit model: rma.glmm with zero events

Jonathan C. Lau jlau287 at uwo.ca
Fri Mar 2 21:20:08 CET 2018


Hi there,

I am performing a meta-analysis of proportions where the event rates are
logit-transformed (PLO) prior to random effects modeling. In the main
analysis, where events are not as sparse, I have been able to run rma.glmm
without any problems. However, when performing the subgroup analysis, I
have some situations where there are zero events in one of the groups,
resulting in the following error: "Error in rma.glmm(measure = "PLO", xi =
num, ni = denom, data = df, slab = UniqueID,  :  Cannot fit ML model." See
below for the log. I've also attached a basic example with .csv and .R code.

Can you please advise?

Happy to provide more details if necessary.

Thanks,
jon

--

> rm(list=ls())
>
> # meta-analysis code example for metafor
> library(metafor)
> library(lme4)
>
> # citing metafor package
> citation(package='metafor')

To cite the metafor package in publications, please use:

  Viechtbauer, W. (2010). Conducting meta-analyses in R with the
  metafor package. Journal of Statistical Software, 36(3), 1-48.
  URL: http://www.jstatsoft.org/v36/i03/

A BibTeX entry for LaTeX users is

  @Article{,
    title = {Conducting meta-analyses in {R} with the {metafor} package},
    author = {Wolfgang Viechtbauer},
    journal = {Journal of Statistical Software},
    year = {2010},
    volume = {36},
    number = {3},
    pages = {1--48},
    url = {http://www.jstatsoft.org/v36/i03/},
  }

> packageVersion('metafor') # to know current version number
[1] ‘1.9.9’
>
> df <- read.table('test.csv', header = TRUE, sep = ',')
> res_IG_Y <- rma.glmm(measure="PLO", xi=num, ni=denom, data=df,
slab=UniqueID)
>
> ### fit random-effects model in the two subgroups
> res_IG_Y_frameless <- rma.glmm(measure="PLO", xi=num, ni=denom, data=df,
slab=UniqueID, subset=(igns=="Y" & frame_type=='frameless')) # zero
Error in rma.glmm(measure = "PLO", xi = num, ni = denom, data = df, slab =
UniqueID,  :
  Cannot fit ML model.
> res_IG_Y_frame <- rma.glmm(measure="PLO", xi=num, ni=denom, data=df,
slab=UniqueID, subset=(igns=="Y" & frame_type=="frame"))
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-meta-analysis/attachments/20180302/74290cab/attachment.html>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: glmm_problem.R
Type: application/octet-stream
Size: 651 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-meta-analysis/attachments/20180302/74290cab/attachment.obj>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.csv
Type: text/csv
Size: 814 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-meta-analysis/attachments/20180302/74290cab/attachment.csv>


More information about the R-sig-meta-analysis mailing list