[R-meta] Questions about model averaging with complex multilevel meta-analytic model

Viechtbauer, Wolfgang (NP) wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Sun Oct 2 12:33:57 CEST 2022


You may be misinterpreting what this exercise is telling you. If the example doesn't run properly on your end, while it does run properly on my end, then this is suggesting that there is an issue with your setup, not that there is a point where MuMIn doesn't work well.

If I do not run the 'eval(metafor:::.MuMIn)' line, then indeed I get the 'subscript out of bounds' error, plus lots of 'Extra argument ('formula') disregarded' warning messages when running dredge().

So did you actually run the 'eval(metafor:::.MuMIn)' line before running dredge()? And if you did, did this work or did you get an error message? Could you also post the output from running sessionInfo()?

Best,
Wolfgang

>-----Original Message-----
>From: Margaret Slein [mailto:maslein using zoology.ubc.ca]
>Sent: Sunday, 02 October, 2022 8:14
>To: Viechtbauer, Wolfgang (NP)
>Cc: r-sig-meta-analysis using r-project.org
>Subject: Re: [R-meta] Questions about model averaging with complex multilevel
>meta-analytic model
>
>1. Tried the example you provided, model.avg did not produce the “subscript out
>of bounds” error, but still didn’t yield model averaged coefficient estimates?
>This was all that was produced in the model.avg output:
>
>Model-averaged coefficients:
>(full average)
>     Estimate Std. Error z value Pr(>|z|)
>
>(conditional average)
>     Estimate Std. Error z value Pr(>|z|)
>Standard errors cannot be calculated because no component models provide them
>
>*However, if I run just the model.avg(res2) without the summary(), that still
>yields the same “subscript out of bounds” error.
>
>2. I tried a simpler version with my own model (just 1 or 2 moderators) and it
>still yields the same “subscript out of bounds error” with just model.avg and the
>summary function as well.
>
>Is there a critical point where meta-analytic models do not work well with model
>averaging in MuMIn?
>
>Thank you for your assistance in troubleshooting this.
>
>-m
>
><*)))><>  <*)))><>   <*)))><>  <*)))><>
>
>Maggie Slein (she/her/hers)
>PhD Student, O’Connor Lab
>Department of Zoology
>Unceded xʷməθkʷəy̓əm (Musqueam) territory
>University of British Columbia
>
>On Sep 29, 2022, at 2:25 AM, Viechtbauer, Wolfgang (NP)
><wolfgang.viechtbauer using maastrichtuniversity.nl> wrote:
>
>Troubleshooting this remotely is difficult.
>
>Does this example run?
>
>https://gist.github.com/wviechtb/891483eea79da21d057e60fd1e28856b
>
>If so, then this is a bit of a head-scratcher given that there is nothing
>fundamentally different about your model. It just has a lot more fixed effects
>(and a slightly simpler random effects structure).
>
>Maybe start by simplifying the 'mods' part. First try with just 2 or 3 of the
>variables and see if that works. If the problem only arises when adding more
>predictors, then this could be a problem with MuMIn. But first, you have to
>narrow down where the problem is coming from.
>
>Best,
>Wolfgang
>
>-----Original Message-----
>From: Margaret Slein [mailto:maslein using zoology.ubc.ca]
>Sent: Wednesday, 28 September, 2022 19:56
>To: Viechtbauer, Wolfgang (NP)
>Cc: r-sig-meta-analysis using r-project.org
>Subject: Re: [R-meta] Questions about model averaging with complex multilevel
>meta-analytic model
>
>Hi Wolfgang,
>
>Yes, very large dataset (1700+). Thank you for the advice on the publication
>bias, I will certainly take this into account.
>
>Related to my original question, I have now fit all my candidate models with ML
>rather than REML, which allows me to use model.sel() in the MuMIn package,
>however, I am still unable to use the model.avg() function without the error
>message "Error in x$coefficients[, 1L] : subscript out of bounds”. What would
>cause this error and how can I model average with rma.mv objects and model.avg()
>in the MuMIn package.
>
>Many thanks,
>Maggie
>
><*)))><>  <*)))><>   <*)))><>  <*)))><>
>
>Maggie Slein (she/her/hers)
>PhD Student, O’Connor Lab
>Department of Zoology
>Unceded xʷməθkʷəy̓əm (Musqueam) territory
>University of British Columbia


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