<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Yes, that's exactly what my design looks like -- and all levels
are incompletely crossed because there are only few studies with
additional samples or additional measures. Thanks again for the
prompt response and the great help! My final question (so I don't
have to post again if I run into the same situation in the future)
would be why the random effect for var1var2 only contains "id" and
not "study/id"?<br>
</p>
<p>Best,</p>
<p>Anna-Lena<br>
</p>
<div class="moz-cite-prefix">Am 13.12.2018 um 17:06 schrieb
Viechtbauer, Wolfgang (SP):<br>
</div>
<blockquote type="cite"
cite="mid:a4c83fb9bae24e44986dafb1f63bfaba@UM-MAIL3214.unimaas.nl">
<pre class="moz-quote-pre" wrap="">Ok, so if I understand (and remember correctly), then you will have two rows for each level of 'id', one for the correlation cor(x1, y) and one for the correlation cor(x2, y). And now you also have studies with multiple (independent) samples. So, for example:
study id var1var2 yi
-------------------------
1 1 var1 .
1 1 var2 .
2 2 var1 .
2 2 var2 .
2 3 var1 .
2 3 var2 .
3 4 var1 .
3 4 var2 .
So, study 2 has 2 samples and hence 4 rows. That would actually be a model with an additional level beyond what Konstantopoulos describes. So you have studies, samples within studies, and then two estimates within samples. Then I would go with:
res <- rma.mv(yi, dat$V, mods = ~ var1var2 - 1, random = list(~ var1var2 | id, ~ 1 | study/id), data=dat$dat)
Best,
Wolfgang
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">-----Original Message-----
From: R-sig-meta-analysis [<a class="moz-txt-link-freetext" href="mailto:r-sig-meta-analysis-bounces@r">mailto:r-sig-meta-analysis-bounces@r</a>-
project.org] On Behalf Of Anna-Lena Schubert
Sent: Thursday, 13 December, 2018 16:36
To: Guido Schwarzer; <a class="moz-txt-link-abbreviated" href="mailto:r-sig-meta-analysis@r-project.org">r-sig-meta-analysis@r-project.org</a>
Subject: Re: [R-meta] Quick question about multiple independent samples
within one study
Thanks for your helpful responses! I will quickly add a follow-up
question regarding implementation: Previously (before accounting for
dependencies within studies), my code looked like this:
res <- rma.mv(yi, dat$V, mods = ~ var1var2 - 1, random = ~
var1var2 | id, struct="UN", data=dat$dat)
Here, I investigate whether the correlation with a criterion variable
differs between two predictors. Now, I have some studies with independent
samples (different age groups), while I have other studies with different
criterion variables within the same sample (different measures). If I
wanted to introduce both dependencies, I believe I could change the code
as follows:
res <- rma.mv(yi, dat$V, mods = ~ var1var2 - 1, random = list(~
var1var2 | id, ~sample | id, ~measure | id), data=dat$dat)
Three concerns: First, is "sample | id" or "id | sample" appropriate?
Second, metafor tells me I can only have to random factors ("Only up to
two '~ inner | outer' formulas allowed in the 'random' argument"). Which
should I drop or is there a workaround? Third, I'm somewhat worrying I
might be overfitting. Is this a legit worry?
Best, Anna-Lena
Am 13.12.2018 um 16:01 schrieb Guido Schwarzer:
Hi,
I got this wrong (and gave a nice answer for a different question).
See Wolfgang's email for the correct answer.
Best wishes, Guido
--
Dr. Anna-Lena Schubert
Postdoc at Section of Personality
Heidelberg University - Institute of Psychology
Hauptstraße 47-51
D-69117 Heidelberg
Germany
Phone: +49 6221 54 7746
Mail: <a class="moz-txt-link-abbreviated" href="mailto:anna-lena.schubert@psychologie.uni-heidelberg.de">anna-lena.schubert@psychologie.uni-heidelberg.de</a>
Web: <a class="moz-txt-link-freetext" href="http://www.psychologie.uni-heidelberg.de/ae/diff/diff/people">http://www.psychologie.uni-heidelberg.de/ae/diff/diff/people</a>-
schubert.html
</pre>
</blockquote>
</blockquote>
<div class="moz-signature">-- <br>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Signatur</title>
<style type="text/css">
.auto-style1 {
font-weight: normal;
}
.auto-style2 {
font-weight: normal;
font-family: Arial;
border-bottom-style: solid;
border-bottom-width: 1px;
padding-bottom: 1px;
}
.auto-style3 {
font-family: Arial, Helvetica, sans-serif;
}
.auto-style4 {
font-size: small;
}
</style>
<h3 class="auto-style2">Dr. Anna-Lena Schubert</h3>
<p style="line-height: 1;"><img
src="cid:part1.09813915.09D031D0@psychologie.uni-heidelberg.de"
data-filename="Logo_Diff.png" style="width: 215.5px; float:
right; height: 49.9136px;"><font class="auto-style3"><span
class="auto-style1"><span class="auto-style4">Postdoc at
Section of Personality</span><br class="auto-style4">
<span class="auto-style4">Heidelberg University - Institute
of Psychology</span></span></font></p>
<pre style="line-height: 1;">Hauptstraße 47-51
<span style="line-height: 1;">D-69117 Heidelberg
</span><span style="line-height: 1;">Germany</span></pre>
<pre style="line-height: 1;">Phone: +49 6221 54 7746
Mail: <a class="moz-txt-link-abbreviated" href="mailto:anna-lena.schubert@psychologie.uni-heidelberg.de">anna-lena.schubert@psychologie.uni-heidelberg.de</a>
Web: <a class="moz-txt-link-freetext" href="http://www.psychologie.uni-heidelberg.de/ae/diff/diff/people-schubert.html">http://www.psychologie.uni-heidelberg.de/ae/diff/diff/people-schubert.html</a></pre>
</div>
</body>
</html>