[R-meta] GLMM issue with metaprop / meta package
Richter Dirk
d|rk@r|chter @end|ng |rom b|h@ch
Wed Apr 10 12:03:40 CEST 2024
Wonderful, thanks, Wolfgang.
Re-installing Matrix and lme4 solved the problem.
Best wishes,
Dirk
-----Ursprüngliche Nachricht-----
Von: Viechtbauer, Wolfgang (NP) <wolfgang.viechtbauer using maastrichtuniversity.nl>
Gesendet: Mittwoch, 10. April 2024 10:46
An: R Special Interest Group for Meta-Analysis <r-sig-meta-analysis using r-project.org>
Cc: Richter Dirk <dirk.richter using bfh.ch>
Betreff: RE: [R-meta] GLMM issue with metaprop / meta package
Dirk has kindly shared the data with me off-list. With:
m1 <- metaprop(event, n, studlab=paste(author, pubyear), data=metadata,
method = "GLMM", control = list(verbose = TRUE))
Dirk is getting the error:
# Error in initializePtr() :
# function 'chm_factor_ldetL2' not provided by package 'Matrix'
while the code runs just fine for me. Some searching leads to:
https://github.com/lme4/lme4/issues/763
https://stackoverflow.com/q/77481539/2615367
which indicates that this issue has nothing to do with meta/metafor or this specific dataset but that the error arises due an update in the Matrix package.
I would start with reinstalling the Matrix package and then lme4:
install.packages("Matrix")
install.packages("lme4")
To be on the safe side, restart R before and after doing so. One could also try installing lme4 from source as described in the links above, but this requires having everything set up for doing so on your computer and this shouldn't really be necessary. On a Windows machine that I just tried, everything works fine with metaprop() when everything is up-to-date.
Best,
Wolfgang
> -----Original Message-----
> From: R-sig-meta-analysis <r-sig-meta-analysis-bounces using r-project.org>
> On Behalf Of Viechtbauer, Wolfgang (NP) via R-sig-meta-analysis
> Sent: Tuesday, April 9, 2024 10:48
> To: R Special Interest Group for Meta-Analysis <r-sig-meta-analysis using r-
> project.org>
> Cc: Viechtbauer, Wolfgang (NP)
> <wolfgang.viechtbauer using maastrichtuniversity.nl>
> Subject: Re: [R-meta] GLMM issue with metaprop / meta package
>
> Hi Dirk,
>
> If you could share the data, I can take a look at why rma.glmm()
> struggles to fit the model.
>
> Whether one can just use the inverse-variance method is impossible to
> say without further details.
>
> Best,
> Wolfgang
>
> > -----Original Message-----
> > From: R-sig-meta-analysis
> > <r-sig-meta-analysis-bounces using r-project.org> On Behalf Of Richter
> > Dirk via R-sig-meta-analysis
> > Sent: Friday, April 5, 2024 18:22
> > To: r-sig-meta-analysis using r-project.org
> > Cc: Richter Dirk <dirk.richter using bfh.ch>
> > Subject: Re: [R-meta] GLMM issue with metaprop / meta package
> >
> > Thanks, Guido and Michael. It's obviously an issue related to the
> > Matrix package. The verbose argument mentioned this error but did
> > not produce any results.
> > Do I understand it correctly that the Inverse method is sufficient
> > for a random effects model?
> > Thanks again,
> > Dirk
> >
> > -----Ursprüngliche Nachricht-----
> > Von: Dr. Guido Schwarzer <guido.schwarzer using uniklinik-freiburg.de>
> > Gesendet: Freitag, 5. April 2024 17:48
> > An: R Special Interest Group for Meta-Analysis
> > <r-sig-meta-analysis using r- project.org>
> > Cc: Richter Dirk <dirk.richter using bfh.ch>
> > Betreff: Re: [R-meta] GLMM issue with metaprop / meta package
> >
> > Dear Dirk,
> >
> > Recently, somebody asked the same question on GitHub
> > (https://github.com/guido-s/meta/issues/57).
> >
> > I changed the development version of meta such that the results of
> > the common effect model are used as a fallback in metaprop() if the
> > GLMM estimation fails (I am not sure any more whether this is a
> > sensible approach. Any comments from the list are welcome on this.).
> >
> > As Michael hinted, you can use verbose = TRUE to get more
> > information on the estimation process. However, this is an argument
> > of rma.glmm() from R package metafor called internally in metaprop() from R package meta.
> >
> > The metaprop() call must look like the following:
> >
> > metaprop(..., control = list(verbose = TRUE))
> >
> > Best,
> > Guido
More information about the R-sig-meta-analysis
mailing list