<div dir="ltr">Hi James,<div><br></div><div>Interesting! I envisioned my data structure to be as shown below. Also, there is a bit of model fit advantage for:</div><div><br></div><div>random = list(~1|study / es, ~1|scale)  over  random = ~1| scale/study/es</div><div><br>Which would perhaps mean that true effect sizes in each row are nested in both studies & scales and can share random-effects within and across both studies and formulas whenever their 'study' or 'scale' ID indicators match. </div><div><br></div><div>Doesn't this seem more like a crossed random-effects structure?</div><div><br></div><div>Fred<br><br><img src="cid:ii_kubh48730" alt="image.png" width="472" height="154"><br></div></div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Oct 3, 2021 at 11:44 AM James Pustejovsky <<a href="mailto:jepusto@gmail.com">jepusto@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Ah I see. In my previous message, I think I misinterpreted what was going on. Based on what you've just described, it sounds like you actually do not have crossed random effects. Rather, you've got a hierarchical structure where effect sizes are nested within studies and studies are nested within scales. If you do not specify a clustering variable, clubSandwich defaults to clustering based on the highest level of random effects, so in your case you were clustering on the scale ID. (You could confirm this by running<div>coef_test(m1, "CR2", cluster = data$scale), to see if the results are identical to coef_test(m1, "CR2").) If there are only a few unique values of the scale variable (I would guess maybe around 6 or 7?) then this would also explain the low degrees of freedom. <br></div><div><br></div><div>So, in addition to the approach described in my previous message, a further alternative would be to treat scale as a set of fixed effects (i.e., dummy variables for each level of scale). and then cluster on studyID. Strictly speaking, this means that you would not be generalizing beyond the observed set of scales. But if you only observe 6 unique levels, trying to do so may be asking for more than the data can support. </div><div><br></div><div>James</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Oct 3, 2021 at 8:41 AM Farzad Keyhan <<a href="mailto:f.keyhaniha@gmail.com" target="_blank">f.keyhaniha@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div><span style="font-family:sans-serif">Hi James and Wolfgang,</span><div dir="auto" style="font-family:sans-serif"><br></div><div dir="auto" style="font-family:sans-serif">Thank you both. Please note that 'scale' doesn't vary within each 'study'. Thus, to generalize beyond 'scale' levels, the only way was to add it as a crossed random-effect. </div><div dir="auto" style="font-family:sans-serif"><br></div><div dir="auto" style="font-family:sans-serif">James, does that make sense to construct a V based only on 'study' cluster using 'impute_covariance_matrix' but then conduct sensitivity on 'r'?</div><div dir="auto" style="font-family:sans-serif"><br></div><div dir="auto" style="font-family:sans-serif">Thanks, </div><div dir="auto" style="font-family:sans-serif">Fred</div><br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Oct 3, 2021, 8:25 AM James Pustejovsky <<a href="mailto:jepusto@gmail.com" target="_blank">jepusto@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">Hi Farzad,<div><br></div><div>clubSandwich does not support clustering in models with crossed random effects. </div><div><br></div><div>There are generalizations of CRVE that work under crosses dependence structures (see Cameron, Gelbach, & Miller, 2011; Cameron & Miller, 2015). But the small-sample corrections implemented in clubSandwich have yet to be worked out for multi-way clustering. Thus, these generalizations only work when there are sufficiently large numbers of clusters *in each clustering dimension*. </div><div><br></div><div>Based on currently available methods and software, I would suggest sticking with model-based inference (as implemented in <a href="http://rma.mv" rel="noreferrer" target="_blank">rma.mv</a>) if your interest is in a model with crossed random effects. That means you’d either have to do the work to develop a defensible V matrix and/or conduct sensitivity analysis for whatever assumptions go into constructing the V matrix.</div><div><br></div><div>James</div><div><br></div><div><span style="color:rgb(34,34,34);font-family:Arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Cameron, A. C., Gelbach, J. B., & Miller, D. L. (2011). Robust inference with multiway clustering. </span><i style="color:rgb(34,34,34);font-family:Arial,sans-serif;font-size:13px">Journal of Business & Economic Statistics</i><span style="color:rgb(34,34,34);font-family:Arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">, </span><i style="color:rgb(34,34,34);font-family:Arial,sans-serif;font-size:13px">29</i><span style="color:rgb(34,34,34);font-family:Arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">(2), 238-249.</span></div><div><font color="#222222" face="Arial, sans-serif" size="2"><span style="background-color:rgb(255,255,255)"><br></span></font></div><div><span style="color:rgb(34,34,34);font-family:Arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">Cameron, A. C., & Miller, D. L. (2015). A practitioner’s guide to cluster-robust inference. </span><i style="color:rgb(34,34,34);font-family:Arial,sans-serif;font-size:13px">Journal of human resources</i><span style="color:rgb(34,34,34);font-family:Arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">, </span><i style="color:rgb(34,34,34);font-family:Arial,sans-serif;font-size:13px">50</i><span style="color:rgb(34,34,34);font-family:Arial,sans-serif;font-size:13px;background-color:rgb(255,255,255)">(2), 317-372.</span><font color="#222222" face="Arial, sans-serif" size="2"><span style="background-color:rgb(255,255,255)"><br></span></font><div dir="ltr"><br><blockquote type="cite">On Oct 3, 2021, at 4:20 AM, Viechtbauer, Wolfgang (SP) <<a href="mailto:wolfgang.viechtbauer@maastrichtuniversity.nl" rel="noreferrer" target="_blank">wolfgang.viechtbauer@maastrichtuniversity.nl</a>> wrote:<br><br></blockquote></div><blockquote type="cite"><div dir="ltr"><span>Hi Fred,</span><br><span></span><br><span>The dfs you see are computed based on a Satterthwaite approximation. Depending on the data structure, the dfs could very well be much lower than the number of studies/estimates.</span><br><span></span><br><span>This aside, a limitation of the cluster robust approach is that it can only capture dependencies that occur within the groups defined by the clustering variable. Or put in a different way, for the approach to work, there need to be a sufficient (for some definition of "sufficient") number of independent groups within the dataset. When introducing crossed random effects or other random effects that can create dependencies across the entire dataset (like spatial correlation or correlation due to phylogeny in meta-analyses in ecology and evolution involing multiple species), then there might only be a single (or very few) subsets in the data that are independent and then the cluster robust approach cannot really be used anymore.</span><br><span></span><br><span>Best,</span><br><span>Wolfgang</span><br><span></span><br><blockquote type="cite"><span>-----Original Message-----</span><br></blockquote><blockquote type="cite"><span>From: R-sig-meta-analysis [mailto:<a href="mailto:r-sig-meta-analysis-bounces@r-project.org" rel="noreferrer" target="_blank">r-sig-meta-analysis-bounces@r-project.org</a>] On</span><br></blockquote><blockquote type="cite"><span>Behalf Of Farzad Keyhan</span><br></blockquote><blockquote type="cite"><span>Sent: Sunday, 03 October, 2021 7:35</span><br></blockquote><blockquote type="cite"><span>To: R meta</span><br></blockquote><blockquote type="cite"><span>Subject: [R-meta] Does clubSandwich::coef_test() handle crossed random-effects?</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Hello Wolfgang and James,</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>I have 51 studies, but when I run an unconditional model (below),</span><br></blockquote><blockquote type="cite"><span>coef_test() outputs a df of 4.76 (makes no sense).</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>I suspected that coef_test() is not picking up my highest-level</span><br></blockquote><blockquote type="cite"><span>cluster (study). So, I made that explicit in the call. And then, I got</span><br></blockquote><blockquote type="cite"><span>an error saying "random effects are not nested".</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>First, does clubSandwich handle models with crossed random-effects? If</span><br></blockquote><blockquote type="cite"><span>not, is there an alternative code for <a href="http://rma.mv" rel="noreferrer" target="_blank">rma.mv</a>() models to accomplish</span><br></blockquote><blockquote type="cite"><span>similar things (I wanted to do egger's test as well)--and of course</span><br></blockquote><blockquote type="cite"><span>the small sample correction may not be available there.</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>Thanks, Fred</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span># Note 'scale' is crossed with 'study'</span><br></blockquote><blockquote type="cite"><span>m1 <- <a href="http://rma.mv" rel="noreferrer" target="_blank">rma.mv</a>(yi, V, random = list(~1|study/es, ~1|scale), data=data)</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>coef_test(m1, "CR2")</span><br></blockquote><blockquote type="cite"><span>   Coef. Estimate    SE t-stat d.f. p-val (Satt) Sig.</span><br></blockquote><blockquote type="cite"><span>1 intrcpt    0.506 0.193   2.63 4.76       0.0489    *</span><br></blockquote><blockquote type="cite"><span></span><br></blockquote><blockquote type="cite"><span>## I made cluster explicit but get an error:</span><br></blockquote><blockquote type="cite"><span>coef_test(m1, "CR2", cluster = data$study)</span><br></blockquote><blockquote type="cite"><span>*** Error: Random effects are not nested within clustering</span><br></blockquote><span></span><br><span>_______________________________________________</span><br><span>R-sig-meta-analysis mailing list</span><br><span><a href="mailto:R-sig-meta-analysis@r-project.org" rel="noreferrer" target="_blank">R-sig-meta-analysis@r-project.org</a></span><br><span><a href="https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis" rel="noreferrer" target="_blank">https://stat.ethz.ch/mailman/listinfo/r-sig-meta-analysis</a></span><br></div></blockquote></div></div></blockquote></div></div></div>
</blockquote></div>
</blockquote></div>