Message-ID: <AS8PR08MB9193C4C0219B906B959ED3F98B212@AS8PR08MB9193.eurprd08.prod.outlook.com>
Date: 2024-03-06T11:57:06Z
From: Wolfgang Viechtbauer
Subject: [R-meta] Error with rma.uni in a Monte Carlo simulation
In-Reply-To: <052B4EEB-54AD-4B3D-9049-5CE76683F468@uniklinik-freiburg.de>
Even easier:
rma(..., method = c("REML","DL"))
I've added functionality to rma() to have a fall-back in case something like REML doesn't converge.
See:
https://wviechtb.github.io/metafor/reference/rma.uni.html#note-1
With respect to convergence, there is also a thorough discussion here:
https://www.metafor-project.org/doku.php/tips:convergence_problems_rma
Best,
Wolfgang
> -----Original Message-----
> From: R-sig-meta-analysis <r-sig-meta-analysis-bounces at r-project.org> On Behalf
> Of Dr. Guido Schwarzer via R-sig-meta-analysis
> Sent: Wednesday, March 6, 2024 12:41
> To: R Special Interest Group for Meta-Analysis <r-sig-meta-analysis at r-
> project.org>
> Cc: Dr. Guido Schwarzer <guido.schwarzer at uniklinik-freiburg.de>
> Subject: Re: [R-meta] Error with rma.uni in a Monte Carlo simulation
>
> To elaborate a bit on using try(). The following code uses the DerSimonian-Laird
> estimator if the REML estimation fails.
>
> m <- try(rma.uni(...))
> if (inherits(m, "try-error"))
> m <- try(rma.uni(..., method = "DL"))
>
> Best,
> Guido