[R-meta] 回复: R-sig-meta-analysis Digest, Vol 83, Issue 8

#QIAO SHUYI# NIE22@QS @end|ng |rom e@ntu@edu@@g
Tue May 14 12:20:58 CEST 2024


Dear All,

Hope this letter finds you well. I am conducting a multiple meta-regression with two predictors. I want to determine the moderating effect of predictor 1 while controlling the effect of predictor 2. But the k (number of studies)  is different  between the predictors. I am wondering if  I  can still conduct such analysis,  and if certain assumptions are violated,  how to address this concern. Thank You.

Best wishes
Shuyi Qiao
________________________________
������: R-sig-meta-analysis <r-sig-meta-analysis-bounces using r-project.org> ���� r-sig-meta-analysis-request using r-project.org <r-sig-meta-analysis-request using r-project.org>
����ʱ��: 2024��4��10�� 20:02
�ռ���: r-sig-meta-analysis using r-project.org <r-sig-meta-analysis using r-project.org>
����: R-sig-meta-analysis Digest, Vol 83, Issue 8

Send R-sig-meta-analysis mailing list submissions to
        r-sig-meta-analysis using r-project.org

To subscribe or unsubscribe via the World Wide Web, visit
        https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis
or, via email, send a message with subject or body 'help' to
        r-sig-meta-analysis-request using r-project.org

You can reach the person managing the list at
        r-sig-meta-analysis-owner using r-project.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of R-sig-meta-analysis digest..."


Today's Topics:

   1. Re: GLMM issue with metaprop / meta package (Richter Dirk)
   2. Re: GLMM issue with metaprop / meta package
      (Viechtbauer, Wolfgang (NP))

----------------------------------------------------------------------

Message: 1
Date: Wed, 10 Apr 2024 10:03:40 +0000
From: Richter Dirk <dirk.richter using bfh.ch>
To: R Special Interest Group for Meta-Analysis
        <r-sig-meta-analysis using r-project.org>
Subject: Re: [R-meta] GLMM issue with metaprop / meta package
Message-ID:
        <ZR0P278MB05234CF6E48E681EBE5C2532FA062 using ZR0P278MB0523.CHEP278.PROD.OUTLOOK.COM>

Content-Type: text/plain; charset="utf-8"

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


------------------------------

Message: 2
Date: Wed, 10 Apr 2024 12:01:31 +0000
From: "Viechtbauer, Wolfgang (NP)"
        <wolfgang.viechtbauer using maastrichtuniversity.nl>
To: R Special Interest Group for Meta-Analysis
        <r-sig-meta-analysis using r-project.org>
Subject: Re: [R-meta] GLMM issue with metaprop / meta package
Message-ID:
        <GV2PR08MB920585B6CDACBF79776AB3018B062 using GV2PR08MB9205.eurprd08.prod.outlook.com>

Content-Type: text/plain; charset="utf-8"

Great, happy to hear this. This kind of issue with the Matrix package can arise again in the future if there are changes that break binary compatibility. See, for example, the announcement on the R-package-devel mailing list from February:

https://stat.ethz.ch/pipermail/r-package-devel/2024q1/010463.html

This affects packages that make use of Matrix, notably lme4 and glmmTMB (via TMB), which are also used within metafor. It can then take a bit of time for everything to be 'aligned' again when pulling binary versions of packages from CRAN.

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: Wednesday, April 10, 2024 12:04
> To: R Special Interest Group for Meta-Analysis <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
>
> 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


------------------------------

Subject: Digest Footer

_______________________________________________
R-sig-meta-analysis mailing list @ R-sig-meta-analysis using r-project.org
To manage your subscription to this mailing list, go to:
https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis


------------------------------

End of R-sig-meta-analysis Digest, Vol 83, Issue 8
**************************************************

	[[alternative HTML version deleted]]



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