[R-meta] Questions metafor random slope

Mathias Weis Damkjær mwd@mkj@er @end|ng |rom he@|th@@du@dk
Mon Nov 11 21:18:51 CET 2024


Thank you so much for replying, Wolfgang.

So, just to make sure I get it right (and other readers as well 🙂):

ma_id = meta-analyses level
trial_id = study level,

res <- rma.mv(yi, vi, mods = ~ moderator, random = list(~ moderator | ma_id, ~ 1 | ma_id / trial_id), struct="GEN", data=d)

This would give the following:

  1.
A nested structure with random-intercepts for trial_id (studies) nested within (meta-analyses), and this will estimate the nested variation / cluster-effect.
  2.
And a random slope for moderator at ma_id (meta-analysis) level and random-intercept for meta-analysis. This will allow moderator's effect to vary across meta-analyses, and will estimate variation of factor at the ma_id (meta-analysis) level.

'id' in the previous reply would be meta-analysis level, yes, but that would give me answer pct. two, right, i.e., variation of the moderator at the ma_id (meta-analysis) level?

Of course this would be a complex model, so it requires a big dataset

Thank you once again!

Mathias

PhD-student
________________________________
From: Viechtbauer, Wolfgang (NP) <wolfgang.viechtbauer using maastrichtuniversity.nl>
Sent: Monday, November 11, 2024 4:20:46 PM
To: R Special Interest Group for Meta-Analysis <r-sig-meta-analysis using r-project.org>
Cc: Mathias Weis Damkjær <mwdamkjaer using health.sdu.dk>
Subject: RE: Questions metafor random slope

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-<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-<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

	[[alternative HTML version deleted]]



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