<div dir="ltr">Thank you so much!</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le jeu. 18 mars 2021 à 11:50, Viechtbauer, Wolfgang (SP) <<a href="mailto:wolfgang.viechtbauer@maastrichtuniversity.nl">wolfgang.viechtbauer@maastrichtuniversity.nl</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear Gladys,<br>
<br>
random=list( ~1|study,~1|lab) makes little sense, since study = 1 from lab X would receive the same random effect as study = 1 from lab Y, but I assume that the 1 is just a number that distinguishes multiple studies from the same lab and has no inherent meaning that somehow links the 1 from lab X to the 1 from lab Y.<br>
<br>
Instead, random=~1|lab/study (you don't need the list()) seems more applicable. This adds random effects for each level of lab and for each study within each lab. Hence, the combination X-1 will be a different random effect than the combiantion Y-1.<br>
<br>
However, this assumes no heterogeneity of the true effects within a study (within a lab). For example, this would assume that the 0.3 and 0.6 (for X-1) are both estimates of the same underlying true effect, which is assumed to be identical. That may or may not be true. Hence, as I noted in my response to Simon (see also <a href="https://www.metafor-project.org/doku.php/analyses:konstantopoulos2011" rel="noreferrer" target="_blank">https://www.metafor-project.org/doku.php/analyses:konstantopoulos2011</a> and search the archives for similar discussions), one should add higher level random effects (such as those for study and lab) to the random effects at the estimate level. So, if you dataset is called 'dat', then do:<br>
<br>
dat$estid <- 1:nrow(dat)<br>
<br>
in combination with random=~1|lab/study/estid.<br>
<br>
Finally, random=list(~1|lab, ~1|lab/study) is superfluous. ~ 1 | lab adds random effects for each level of lab and ~1|lab/study also does this (plus it adds random effects for each level of study within lab). So this would add random effects for lab twice.<br>
<br>
Best,<br>
Wolfgang<br>
<br>
>-----Original Message-----<br>
>From: Gladys Barragan-Jason [mailto:<a href="mailto:gladou86@gmail.com" target="_blank">gladou86@gmail.com</a>]<br>
>Sent: Thursday, 18 March, 2021 11:17<br>
>To: Viechtbauer, Wolfgang (SP)<br>
>Cc: R meta<br>
>Subject: Re: [R-meta] Multivariate meta-analysis when "some studies" are multi-<br>
>outcome<br>
><br>
>Dear Wolfgang,<br>
><br>
>After reading your post carefully, I am still a bit confused about how to<br>
>implement the random effects.<br>
>My data are coded as follows (similar number or text in one lab means same lab and<br>
>similar number or text in one study means same participants). As you can see you<br>
>can have several studies from one lab and several effect sizes for one study.<br>
>Should I then code the random effects like this:<br>
>random=list( ~1|study,~1|lab)<br>
>or like this:<br>
>random=list( ~1|lab/study)<br>
>or like that;<br>
>random=list( ~1|lab, ~1|lab/study)<br>
><br>
>lab study effect size<br>
>X 1 0.3<br>
>X 1 0.6<br>
>X 2 0.2<br>
>Y 1 0.5<br>
>Y 2 0.1<br>
>Z 1 0.1<br>
><br>
>Thanks a lot for your help.<br>
>Best wishes,<br>
>Gladys<br>
><br>
>Le mer. 17 mars 2021 à 13:27, Viechtbauer, Wolfgang (SP)<br>
><<a href="mailto:wolfgang.viechtbauer@maastrichtuniversity.nl" target="_blank">wolfgang.viechtbauer@maastrichtuniversity.nl</a>> a écrit :<br>
>Dear Gladys,<br>
><br>
>Whether this makes sense depends on how thse variables are coded. There have been<br>
>several posts in the past on this mailing list where this was discussed. One that<br>
>I quickly found is:<br>
><br>
><a href="https://stat.ethz.ch/pipermail/r-sig-meta-analysis/2018-July/000896.html" rel="noreferrer" target="_blank">https://stat.ethz.ch/pipermail/r-sig-meta-analysis/2018-July/000896.html</a><br>
><br>
>Best,<br>
>Wolfgang<br>
><br>
>>-----Original Message-----<br>
>>From: Gladys Barragan-Jason [mailto:<a href="mailto:gladou86@gmail.com" target="_blank">gladou86@gmail.com</a>]<br>
>>Sent: Tuesday, 16 March, 2021 11:39<br>
>>To: Viechtbauer, Wolfgang (SP)<br>
>>Cc: Simon Harmel; R meta<br>
>>Subject: Re: [R-meta] Multivariate meta-analysis when "some studies" are multi-<br>
>>outcome<br>
>><br>
>>Dear Wolfgang,<br>
>><br>
>>Following Simon's question, I am also comparing the efficiency of programs (pre-<br>
>>post comparisons).<br>
>>For some of them, I do have several effect sizes for one study and one lab. So I<br>
>>was using the following code to account for it.<br>
>><br>
>>res.ExpNC<-<a href="http://rma.mv" rel="noreferrer" target="_blank">rma.mv</a>(yi, vi, mods= ~ categ , random=list(<br>
>~1|study,~1|lab),data=dat2)<br>
>><br>
>>But I am now wondering whether I should do this instead:<br>
>><br>
>>dat2$estid <- 1:nrow(dat2)<br>
>>res.ExpNC<-<a href="http://rma.mv" rel="noreferrer" target="_blank">rma.mv</a>(yi, vi, mods= ~ categ , random=list(<br>
>>~1|study/estid,~1|lab/estid),data=dat2)<br>
>><br>
>>What do you think?<br>
>><br>
>>Thanks a lot for your response,<br>
>><br>
>>Gladys<br>
>><br>
>>Le mar. 16 mars 2021 à 11:28, Viechtbauer, Wolfgang (SP)<br>
>><<a href="mailto:wolfgang.viechtbauer@maastrichtuniversity.nl" target="_blank">wolfgang.viechtbauer@maastrichtuniversity.nl</a>> a écrit :<br>
>>Dear Simon,<br>
>><br>
>>At the very least, you should add random effects at the level of the studies and<br>
>>at the level of the estimates, so:<br>
>><br>
>>dat$estid <- 1:nrow(dat)<br>
>><br>
>>and then<br>
>><br>
>>random = ~ 1 | id / estid<br>
>><br>
>>For longitudinal data, one could also consider using some kind of autocorrelation<br>
>>structure for the estimates within studies. There are some examples here:<br>
>><br>
>><a href="https://wviechtb.github.io/metafor/reference/dat.ishak2007.html" rel="noreferrer" target="_blank">https://wviechtb.github.io/metafor/reference/dat.ishak2007.html</a><br>
>><a href="https://wviechtb.github.io/metafor/reference/dat.fine1993.html" rel="noreferrer" target="_blank">https://wviechtb.github.io/metafor/reference/dat.fine1993.html</a><br>
>><br>
>>clubSandwich::impute_covariance_matrix() also allows for the construction of a V<br>
>>matrix with an autocorrelation structure.<br>
>><br>
>>If the different outcomes are meaningfully related across studies (i.e., outcome<br>
>>'1' stands for the same thing across all studies), then one could also consider<br>
>>using an unstructured var-cov matrix with correlated random effects for outcomes<br>
>>within studies. This would be akin to:<br>
>><br>
>><a href="https://www.metafor-project.org/doku.php/analyses:berkey1998" rel="noreferrer" target="_blank">https://www.metafor-project.org/doku.php/analyses:berkey1998</a><br>
>><br>
>>Best,<br>
>>Wolfgang<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><p class="MsoNormal"><span style="font-size:12pt;font-family:Cambria,serif;color:black">------------------------------------------</span></p><p class="MsoNormal"><span style="font-size:12pt;font-family:Cambria,serif;color:black">Gladys Barragan-Jason, PhD. <u></u><u></u></span><a href="https://sites.google.com/view/gladysbarraganjason/home" style="font-family:Tahoma,sans-serif" target="_blank"> Website</a></p>
<p class="MsoNormal"><span style="font-size:12pt;font-family:Cambria,serif;color:black">Station d'Ecologie Théorique et Expérimentale (SETE)<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:12pt;font-family:Cambria,serif;color:black">CNRS de Moulis<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span style="color:black"><img border="0" width="133" height="81" style="width: 1.3854in; height: 0.8437in;" src="cid:image003.png@01D62ED8.BF1FBC30" alt="image.png"><img border="0" width="60" height="60" style="width: 0.625in; height: 0.625in;" src="cid:image004.png@01D62ED8.BF1FBC30" alt="image.png"><u></u><u></u></span></p>
</div>
<br>
<br>
<p class="MsoNormal"><span lang="EN-GB" style="font-family:Tahoma,sans-serif"> </span></p></div></div></div></div>