Skip to content
Prev 5276 / 5632 Next

[R-meta] errors returned by rma() and rma.mv() when fitting a large dataset

Dear Yefeng,

The problem is that quite a bit of code in metafor works with k*k matrices, where k is the number of estimates. A matrix of that size can quickly get very large, as you can tell.

To fit a RE model, you can use rma.mv() with sparse=TRUE. This will avoid those large matrices. However, trimfill() and selmodel() won't work with rma.mv objects, even if they are just 'standard' RE models.

I *think* (but would have to double-check very carefully) that selmodel() actually doesn't make use of k*k matrices. If so, you could take the rma.mv results, stuff them into an object that has the structure of a rma.uni object, and then call selmodel() on that object. Not very elegant, but this could be a solution. But trimfill() directly calls rma.uni() for model fitting, so this trick wouldn't work. In principle, one could spin a trimfill() version that avoids calling rma.uni() but this would take some work.

Maybe you could try the 'meta' package and its trimfill() function?

Best,
Wolfgang
Message-ID: <DU0PR08MB92010901ED9F67F01E7148EB8BEB2@DU0PR08MB9201.eurprd08.prod.outlook.com>
In-Reply-To: <SYCPR01MB542371D709AD90C6E8B8FA7D9DEB2@SYCPR01MB5423.ausprd01.prod.outlook.com>