[R-meta] Questions metafor random slope

Viechtbauer, Wolfgang (NP) wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Mon Nov 11 16:20:46 CET 2024


Dear Mathias,

See below for my responses.

Best,
Wolfgang

> -----Original Message-----
> From: R-sig-meta-analysis <r-sig-meta-analysis-bounces using r-project.org> On Behalf
> Of Mathias Weis Damkjær via R-sig-meta-analysis
> Sent: Friday, November 8, 2024 15:50
> To: r-sig-meta-analysis using r-project.org
> Cc: Mathias Weis Damkjær <mwdamkjaer using health.sdu.dk>
> Subject: [R-meta] Questions metafor random slope
>
> Hello everyone,
>
> I have a few questions about a more complicated model specification in metafor.
> I have also created a stackoverflow thread with no replies yet here:
> https://stackoverflow.com/questions/79165730/random-slopes-and-intercepts-in-
> the-metafor-package-model-specification-and-out
>
> I have read the e-mail correspondence: https://stat.ethz.ch/pipermail/r-sig-
> meta-analysis/2019-August/001650.html with interest.
>
> However, I do have some questions.
>
>   1.  Question 1:
>
> The model specification:
>
>   *   res <- rma.mv(logOR, logOR.var, mods = ~ CF1_Women..IMP, random = list(~
> CF1_Women..IMP | id, ~ 1 | row), struct="GEN", data=d)
>
> Adds a multilevel structure AND random slopes for the covariate within meta-
> analyses.
>
> I was wondering why one should not specify the model with: ~ 1 | id/row as the
> last element in the list of random-effects? That is the notation for instance in
> the lme4 package.

This would add a random intercept at the level of 'id' twice, once via '~ CF1_Women..IMP | id' and once via '~ 1 | id/row'. Note that the latter is a shortcut for '~ 1 | id' and '~ 1 | row %in% id' just like in lme4. So I suspect that this model would be overparameterized. But you can always try it out with your data and profile the variance components with profile() to see if they are identifiable.

>   1.  Question 2:
>
> The tau2 estimates (variance components) from this model:
>
> Variance Components:
>
>             estim    sqrt  nlvls  fixed    factor
>
> sigma^2    X  X    X     no  trial_id
>
> outer factor: id       (nlvls = X)
> inner term:   ~factor (nlvls = X)
>
>               estim    sqrt  fixed  rho:  intr    c_SP
> intrcpt        X      X                 no           -  X
> factor     X        X no          no       -
>
> Sigma2 is for trial_level.
>
> Is it correct that intrcpt is for the meta-analyses level?

I can't answer that question, since I don't know what you mean by 'meta-analyses level'. The variance corresponding to 'intrcpt' is the estimated variance of the intercepts at the 'id' level. Maybe that helps?

> Thanks in advance!
>
> Best,
> Mathias, Phd. Student


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