[R-meta] Covariance-variance matrix when studies share multiple treatment x control comparison

Viechtbauer, Wolfgang (SP) wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Fri Sep 27 17:27:02 CEST 2019

You are still using 'residuals' as the outcome. Don't do that. Just use the Hedges' g values as the outcome. Also, you should specify the correct V matrix (I think you called it VCV in an earlier post). So, for example:

rma.mv(hedged ~ precision.2, VCV, data=MHF, random = list(~ 1 | Study, ~1 | Id),  subset=(Spatial.scale.2=="Fragmentation scale"))

I haven't looked at your other post in detail, but 'random = ~ factor(x) | Study/Id' doesn't actually work (at least not in the way you think it does). Please update your metafor installation to get an error that will inform you of this. Instead, random = list(~factor(x)|Study, ~factor(x)|Id) is indeed the correct way to specify two '~ inner | outer' terms.


-----Original Message-----
From: Ju Lee [mailto:juhyung2 using stanford.edu] 
Sent: Friday, 27 September, 2019 16:46
To: James Pustejovsky
Cc: Viechtbauer, Wolfgang (SP); r-sig-meta-analysis using r-project.org
Subject: Re: Covariance-variance matrix when studies share multiple treatment x control comparison

Dear James, Wolfgang,

Thank you very much for this information.
I have one question extending from this is: While I run my main mixed modes always using var-covar. matrix (to account for shared study groups within each study), 
it is acceptable that my egger-like regression does not incorporate this structure, but rather just use sqrt(1 / n1 + 1 / n2)  as precision (instead of sqrt(diag(v.c.matrix)) like Wolfgang suggested as one possibility) and use p-value for precision term (precision.2 which is p=0.2382) to determine the asymmetry?

  pr<-sqrt((1 / CN) + (1/TN))
precision.2<-prec.(MHF$n.t, MHF$n.c)
> egger.pr2.frag<-rma.mv(residuals~precision.2,var,data=MHF,random =list( ~ 1 | Study, ~1|Id),  subset=(Spatial.scale.2=="Fragmentation scale"))
> egger.pr2.frag

Multivariate Meta-Analysis Model (k = 285; method: REML)
Variance Components: 
  estim    sqrt  nlvls  fixed  factor
sigma^2.1  0.4255  0.6523     73     no   Study
sigma^2.2  0.3130  0.5595    285     no      Id
Test for Residual Heterogeneity: 
  QE(df = 283) = 1041.1007, p-val < .0001
Test of Moderators (coefficient(s) 2): 
  QM(df = 1) = 1.3909, p-val = 0.2382

Model Results:
  estimate      se     zval    pval    ci.lb   ci.ub   
intrcpt        0.0529  0.1617   0.3274  0.7433  -0.2640  0.3699   
precision.2   -0.0668  0.0567  -1.1794  0.2382  -0.1779  0.0442   
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 

Thank you very much, both of you.

p.s. Wolfgang, I think I figured out what went wrong with how I specified my random effects in my previous e-mail. Specifying it as random=list(~factor(x)|Study, ~factor(x)|Id) instead of random= ~factor(x)|Study/Id generates results that makes sense to me now. Please let me know if this is correct way I should be coding.

More information about the R-sig-meta-analysis mailing list