[R-meta] Covariance-variance matrix when studies share multiple treatment x control comparison
Ju Lee
juhyung2 @end|ng |rom @t@n|ord@edu
Fri Sep 27 18:15:31 CEST 2019
Dear Wolfgang,
Thank you for your patience. It definitely slipped out, and now I've run the model with hedged (not residual), modified precision following James' new work, and specified correct variance-covariance matrix. Also thank you for clarifying how to specify random effect correctly. I believe I will upgrade the version as you have suggested.
Please don't feel you need to respond to my other post as this was the major issue.
The other issue I brought up in that e-mail was more general question and if I may I will explain here:
My data consists of 4 major groups that each examines effect of different habitat variable on the same response variable. I am basically running all random or mixed effect models separately for each of these four data clumps as I want to understand how each type of change influences. However, I'm also running an analysis pooling all studies to understand the overall pattern and moderator effects. For this purpose, I wonder if I should parametrize these different 4 groups in pooled model, say in the form of random effect? I am not sure if this makes sense, or am I just overparameterizing....
I wonder do I need to make changes from full.chs.es<-rma.mv(hedged~chs,VCV, method="REML", random = list(~ chs| Study, ~chs|ID), data=MHF)
to something like: full.chs.es<-rma.mv(hedged~chs,VCV, method="REML", random = list( ~ chs | Study, ~chs |ID, ~chs | Habitat.change.type), data=MHF)?
Thank you very much, Wolfgang.
Hopefully this will take care of most issues that I've been having so far!
Best wishes,
JU
________________________________
From: Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer using maastrichtuniversity.nl>
Sent: Friday, September 27, 2019 8:27 AM
To: Ju Lee <juhyung2 using stanford.edu>; James Pustejovsky <jepusto using gmail.com>
Cc: r-sig-meta-analysis using r-project.org <r-sig-meta-analysis using r-project.org>
Subject: RE: Covariance-variance matrix when studies share multiple treatment x control comparison
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.
Best,
Wolfgang
-----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?
prec.<-function(CN,TN){
pr<-sqrt((1 / CN) + (1/TN))
return(pr)
}
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.
Best,
JU
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.
[[alternative HTML version deleted]]
More information about the R-sig-meta-analysis
mailing list