<div dir="ltr">Dear Wolfgang,<div><br></div><div>After reading your post carefully, I am still a bit confused about how to implement the random effects.</div><div>My data are coded as follows (similar number or text in one lab means same lab and similar number or text in one study means same participants). As you can see you can have several studies from one lab and several effect sizes for one study.</div><div>Should I then code the random effects like this:  </div><div><b>random=list( ~1|study,~1|lab)</b><br></div><div>or like this: </div><div><b>random=list( ~1|lab/study)</b><br></div><div>or like that;</div><div><b>random=list( ~1|lab, ~1|lab/study)</b><br></div><div><br></div><div>lab       study   effect size</div><div>X              1           0.3</div><div>X              1           0.6</div><div>X              2          0.2</div><div>Y              1           0.5</div><div>Y              2           0.1</div><div>Z              1           0.1</div><div><br></div><div>Thanks a lot for your help.</div><div>Best wishes,</div><div>Gladys</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mer. 17 mars 2021 à 13:27, 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>
Whether this makes sense depends on how thse variables are coded. There have been several posts in the past on this mailing list where this was discussed. One that 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( ~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>
><br>
>>-----Original Message-----<br>
>>From: Simon Harmel [mailto:<a href="mailto:sim.harmel@gmail.com" target="_blank">sim.harmel@gmail.com</a>]<br>
>>Sent: Monday, 15 March, 2021 17:31<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 Prof. Viechtbauer,<br>
>><br>
>>Many thanks for your response. I found the following particularly helpful<br>
>>(<a href="https://stat.ethz.ch/pipermail/r-sig-meta-analysis/2019-March/001484.html" rel="noreferrer" target="_blank">https://stat.ethz.ch/pipermail/r-sig-meta-analysis/2019-March/001484.html</a>).<br>
>><br>
>>So, I went from my initial model: `<a href="http://rma.mv" rel="noreferrer" target="_blank">rma.mv</a>(d, V = SE^2, mods = ~factor(outcome)-1,<br>
>>random= ~1|id, data = dat)`<br>
>>to now:<br>
>><br>
>>`V <- clubSandwich::impute_covariance_matrix(vi = dat$SE^2, cluster = dat$id, r =<br>
>>0.7)`<br>
>>`<a href="http://rma.mv" rel="noreferrer" target="_blank">rma.mv</a>(d, V = V, mods = ~factor(outcome)-1, random= ~1|id, data = dat)`<br>
>><br>
>>However, what type of dependence is accounted for by the multilevel part (i.e.,<br>
>>`random= ~1|id`), and what type of dependence is accounted for by including the<br>
>>imputed variance-covariance matrix?<br>
>><br>
>>Specifically, in my data, all primary studies (n=52) are longitudinal, 15 of them<br>
>>are multi-outcome, and almost all are multi-group treatments. Are all of these<br>
>>types of dependence reasonably accounted for?<br>
>><br>
>>Many thanks for your consideration,<br>
>>Simon<br>
>><br>
>>On Mon, Mar 15, 2021 at 6:54 AM Viechtbauer, Wolfgang (SP)<br>
>><<a href="mailto:wolfgang.viechtbauer@maastrichtuniversity.nl" target="_blank">wolfgang.viechtbauer@maastrichtuniversity.nl</a>> wrote:<br>
>>Hi Simon,<br>
>><br>
>>I would suggest to search/browse the archives, as this kind of question has been<br>
>>discussed at various points in the past. The archives can be found here:<br>
>><br>
>><a href="https://stat.ethz.ch/pipermail/r-sig-meta-analysis/" rel="noreferrer" target="_blank">https://stat.ethz.ch/pipermail/r-sig-meta-analysis/</a><br>
>><br>
>>There is no built-in search functionality for the archives, but one can restrict<br>
>>search engines to conduct searches at particular sites. For example, if you do a<br>
>>google search including<br>
>><br>
>>site:<a href="https://stat.ethz.ch/pipermail/r-sig-meta-analysis/" rel="noreferrer" target="_blank">https://stat.ethz.ch/pipermail/r-sig-meta-analysis/</a><br>
>><br>
>>you should only get 'hits' from the mailing list archives. The same should work<br>
>>with DuckDuckGo. Note sure about other engines.<br>
>><br>
>>Note that search engines index the archives at semi-regular intervals, so the<br>
>most<br>
>>recent posts will not show up this way, but those can be searched manually.<br>
>><br>
>>Best,<br>
>>Wolfgang<br>
>><br>
>>>-----Original Message-----<br>
>>>From: R-sig-meta-analysis [mailto:<a href="mailto:r-sig-meta-analysis-bounces@r-project.org" target="_blank">r-sig-meta-analysis-bounces@r-project.org</a>] On<br>
>>>Behalf Of Simon Harmel<br>
>>>Sent: Saturday, 13 March, 2021 23:53<br>
>>>To: R meta<br>
>>>Subject: [R-meta] Multivariate meta-analysis when "some studies" are multi-<br>
>>outcome<br>
>>><br>
>>>Dear All,<br>
>>><br>
>>>I'm conducting a meta-analysis where 15 out of 52 studies have used more<br>
>>>than one outcome variable. In addition, almost all studies include multiple<br>
>>>treatments.<br>
>>><br>
>>>A shortened version (i.e., without moderators) of our dataset appears below<br>
>>>(`*id`=study id; `d`=effect size; `SE` = standard error; `outcome`=outcome<br>
>>>variable index*).<br>
>>><br>
>>>I was wondering what would be the appropriate modeling options for such a<br>
>>>situation?<br>
>>><br>
>>>I appreciate your expertise and consideration,<br>
>>>Simon<br>
>>><br>
>>>*#-- R data and code:*<br>
>>>dat <- read.csv("<a href="https://raw.githubusercontent.com/hkil/m/master/tst.csv" rel="noreferrer" target="_blank">https://raw.githubusercontent.com/hkil/m/master/tst.csv</a>")<br>
>>><br>
>>>library(metafor)<br>
>>><a href="http://rma.mv" rel="noreferrer" target="_blank">rma.mv</a>(d, V = SE^2, mods = ~factor(outcome)-1, random= ~1|id, data = dat)<br>
>>>## I'm assuming this would be an insufficient model<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>