Skip to content
Prev 2874 / 5632 Next

[R-meta] Random slopes in rma.mv

Thanks for your answers Wolfgang. I?ll clarify some points:


  1.  Indeed, the structure (~X | ID2/ID1) does not work. This point connected with the 2nd one, as I wanted to know how to add the random slopes just for ID2.
  2.  ?Could the following structure work in the same way?

Random = list( ~ 1 | ID2, ID1, ~ X -1 | ID2) (Using the lmer syntax)

  1.  So sorry it wasn?t clear enough. I meant:

Level 1: Effect sizes.

Level 2: ID1

Level 3: ID2 and ID3



Which translates to:

ES / ID1 / (ID2 & ID3), therefore I would have the effect size Yi(jk), where the i-eth outcome is crossed between ID2 and ID3, both at the same level 3.


Thanks again for your answers!

Francisco Tapia


From: Viechtbauer, Wolfgang (SP)<mailto:wolfgang.viechtbauer at maastrichtuniversity.nl>
Sent: Sunday, May 23, 2021 12:45 PM
To: Francisco Tapia<mailto:Francisco.ninel at hotmail.com>; r-sig-meta-analysis at r-project.org<mailto:r-sig-meta-analysis at r-project.org>
Subject: RE: Random slopes in rma.mv

Dear Francisco,

See below for my responses.

Best,
Wolfgang
~ X | ID2/ID1 doesn't work anyway (you should get an error if you try, at least if you have the 'devel' version installed).
Yes, you would be adding random intercepts for each level of ID2 twice. I would avoid doing so. You could do:

random = list(~ 1 | interaction(ID2,ID1), ~ X | ID2), struct="GEN"

to add random intercepts for each ID2-ID1 combination (i.e., for ID1 nested within ID2) and random intercepts and slopes for each level of ID2.
I don't understand what you mean by ID3 being 'at the same level' as ID2.