<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="blue" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">Glad I could help Norman.</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Have a great week,</p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">FT</p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="mso-element:para-border-div;border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="border:none;padding:0in"><b>From: </b><a href="mailto:norman.daurelle@agroparistech.fr">Norman DAURELLE</a><br>
<b>Sent: </b>Tuesday, May 25, 2021 3:23 AM<br>
<b>To: </b><a href="mailto:wolfgang.viechtbauer@maastrichtuniversity.nl">Wolfgang Viechtbauer, SP</a><br>
<b>Cc: </b><a href="mailto:francisco.ninel@hotmail.com">Francisco Tapia</a>; <a href="mailto:r-sig-meta-analysis@r-project.org">
r-sig-meta-analysis</a><br>
<b>Subject: </b>Re: [R-meta] Random slopes in rma.mv</p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black;background:white">Dear metanalysis community,
</span><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black;background:white"><br>
<br>
</span><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black;background:white">Francisco Tapia, Wolfgang Viechtbauer,</span><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black"><o:p></o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black;background:white">thanks for this exchange ! I do not always read everything, but this thread caught my eye and I'm very glad I didn't miss it.</span><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black;background:white"><br>
<br>
</span><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black;background:white">So once again, thank you very much because it explains things I may not have been able to phrase as clearly.</span><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black;background:white"><br>
<br>
</span><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black;background:white">Norman Daurelle.</span><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black"><img border="0" width="708" height="1" style="width:7.375in;height:.0104in" id="Horizontal_x0020_Line_x0020_1" src="cid:image002.png@01D75164.613C4C00"></span><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black"><o:p></o:p></span></p>
<div>
<p class="MsoNormal"><b><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black">De:
</span></b><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black">"Wolfgang Viechtbauer, SP" <wolfgang.viechtbauer@maastrichtuniversity.nl><br>
<b>À: </b>"Francisco Tapia" <francisco.ninel@hotmail.com>, "r-sig-meta-analysis" <r-sig-meta-analysis@r-project.org><br>
<b>Envoyé: </b>Dimanche 23 Mai 2021 21:37:11<br>
<b>Objet: </b>Re: [R-meta] Random slopes in rma.mv<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black"><o:p> </o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span style="font-size:12.0pt;font-family:"Arial",sans-serif;color:black">Yes, -1 and +0 accomplish the same thing.<br>
<br>
The || syntax does not currently work, but I recently added struct="GDIAG" to accomplish the same thing. I will probably try to implement || though and if this works then remove struct="GDIAG".<br>
<br>
Best,<br>
Wolfgang<br>
<br>
>-----Original Message-----<br>
>From: Francisco Tapia [mailto:francisco.ninel@hotmail.com]<br>
>Sent: Sunday, 23 May, 2021 21:25<br>
>To: Viechtbauer, Wolfgang (SP); r-sig-meta-analysis@r-project.org<br>
>Subject: RE: Random slopes in rma.mv<br>
><br>
>I thought adding 0 accounted for uncorrelated random intercept and slopes -> (~ X<br>
>+ 0 | ID2), equivalently (~ X || ID2). From what you tell me, 0 and -1 would be<br>
>analogous then.<br>
>Regarding the last question, it was purely exploratory. I'll be applying profile()<br>
>to test it out.<br>
><br>
>Thanks Wolfgang!<br>
>From: Viechtbauer, Wolfgang (SP)<br>
>Sent: Sunday, May 23, 2021 3:11 PM<br>
>To: Francisco Tapia; r-sig-meta-analysis@r-project.org<br>
>Subject: RE: Random slopes in rma.mv<br>
><br>
>>-----Original Message-----<br>
>>From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces@r-project.org] On<br>
>>Behalf Of Francisco Tapia<br>
>>Sent: Sunday, 23 May, 2021 20:33<br>
>>To: r-sig-meta-analysis@r-project.org<br>
>>Subject: Re: [R-meta] Random slopes in rma.mv<br>
>><br>
>>Thanks for your answers Wolfgang. I'll clarify some points:<br>
>><br>
>>  1.  Indeed, the structure (~X | ID2/ID1) does not work. This point connected<br>
>>with the 2nd one, as I wanted to know how to add the random slopes just for ID2.<br>
>>  2.  Could the following structure work in the same way?<br>
>><br>
>>Random = list( ~ 1 | ID2, ID1, ~ X -1 | ID2) (Using the lmer syntax)<br>
><br>
>I think you meant: list(~ 1 | ID2/ID1, ~ X -1 | ID2)<br>
><br>
>You could do that too, but this implies that the random intercepts for ID2 are<br>
>assumed to be uncorrelated with the random slopes for ID2. With<br>
><br>
>list(~ 1 | interaction(ID2,ID1), ~ X | ID2)<br>
><br>
>the random intercepts and slopes are allowed to be correlated.<br>
><br>
>>  1.  So sorry it wasn't clear enough. I meant:<br>
>><br>
>>Level 1: Effect sizes.<br>
>><br>
>>Level 2: ID1<br>
>><br>
>>Level 3: ID2 and ID3<br>
>><br>
>>Which translates to:<br>
>><br>
>>ES / ID1 / (ID2 & ID3), therefore I would have the effect size Yi(jk), where the<br>
>>i-eth outcome is crossed between ID2 and ID3, both at the same level 3.<br>
><br>
>If you want to know if you could do something like random = list(~ x | ID2, ~ x |<br>
>ID3), then yes, in principle that is possible. I don't know whether this makes<br>
>sense in the context of your data or whether the parameters of such a model are<br>
>identifiable (profile() can help to determine the latter).<br>
><br>
>>Thanks again for your answers!<br>
>><br>
>>Francisco Tapia<br>
>><br>
>>From: Viechtbauer, Wolfgang<br>
>>(SP)<mailto:wolfgang.viechtbauer@maastrichtuniversity.nl><br>
>>Sent: Sunday, May 23, 2021 12:45 PM<br>
>>To: Francisco Tapia<mailto:Francisco.ninel@hotmail.com>; r-sig-meta-analysis@r-<br>
>>project.org<mailto:r-sig-meta-analysis@r-project.org><br>
>>Subject: RE: Random slopes in rma.mv<br>
>><br>
>>Dear Francisco,<br>
>><br>
>>See below for my responses.<br>
>><br>
>>Best,<br>
>>Wolfgang<br>
>><br>
>>>-----Original Message-----<br>
>>>From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces@r-project.org] On<br>
>>>Behalf Of Francisco Tapia<br>
>>>Sent: Thursday, 20 May, 2021 18:29<br>
>>>To: r-sig-meta-analysis@r-project.org<br>
>>>Subject: [R-meta] Random slopes in rma.mv<br>
>>><br>
>>>Dear metanalysis community:<br>
>>><br>
>>>A couple of days ago, Wolfgang provided me the information to add random slopes<br>
>>to<br>
>>>rma.mv, from the metafor package<br>
>>>(https://stats.stackexchange.com/questions/524144/random-slopes-in-rma-mv)<br>
>>><br>
>>>By changing the struct to "GEN", I can now add random to my multilevel model. As<br>
>>>the documentation is not up yet, I wanted to check some things regarding<br>
>syntaxis<br>
>>>of the code and the logic behind it:<br>
>>><br>
>>>  1.  If I have ID1 nested within ID2, my structure of random effects would be:<br>
>(<br>
>>>~ 1 | ID2/ID1) for random intercepts.  If I want to add random slopes to ID2,<br>
>>>Should I do it in another random effect? For example, If I add random slopes to<br>
>(<br>
>>>~ 1 | ID2/ID1), therefore -> ( ~ X | ID2/ID1), I'll be adding random slopes for<br>
>>>each level of ID1 within ID2, and for ID2 as well. Should I leave ( ~ 1 |<br>
>>>ID2/ID1) alone and create another random effect to add random slopes just for<br>
>>ID2?<br>
>><br>
>>~ X | ID2/ID1 doesn't work anyway (you should get an error if you try, at least<br>
>if<br>
>>you have the 'devel' version installed).<br>
>><br>
>>>  2.  If I create another random effect to add random slopes to ID2, for<br>
>example,<br>
>>>(~ X | ID2), Would I be adding another random intercept for ID2? If so, How, an<br>
>>>unnecessary intercept, can affect my model? I cannot see it very clearly<br>
>><br>
>>Yes, you would be adding random intercepts for each level of ID2 twice. I would<br>
>>avoid doing so. You could do:<br>
>><br>
>>random = list(~ 1 | interaction(ID2,ID1), ~ X | ID2), struct="GEN"<br>
>><br>
>>to add random intercepts for each ID2-ID1 combination (i.e., for ID1 nested<br>
>within<br>
>>ID2) and random intercepts and slopes for each level of ID2.<br>
>><br>
>>>  3.  If I have a crossed random effect at the same level as ID2, let's say (~ 1<br>
>>>|ID3) for random intercepts. Can both of them, ID2 and ID3, have different<br>
>random<br>
>>>slopes structure from each other, despite being in the same level?<br>
>><br>
>>I don't understand what you mean by ID3 being 'at the same level' as ID2.<br>
>><br>
>>>Thanks in advance!<br>
>>><br>
>>>Francisco Tapia<br>
<br>
_______________________________________________<br>
R-sig-meta-analysis mailing list<br>
R-sig-meta-analysis@r-project.org<br>
https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>