[R-meta] Two ways to calculate subgroup and overall average effect sizes
Naike Wang
wangnaike1989 at gmail.com
Wed Aug 16 18:28:58 CEST 2017
Hi all,
I noticed that in Comprehensive Meta Analysis (CMA), there are two options
you can select to calculate subgroup average effect sizes. The first
approach is assume a common among-study variance component across subgroups
and the second one is not assume a common among-study variance component.
When you select different approaches, the subgroup average effect sizes,
the overall average effect size and their confidence intervals will change
accordingly. This has something to do with the tau-squared calculated by
different approaches. This video
<https://www.youtube.com/watch?v=Y7X5ZbfJgDI&t=1714s.>here explains the
reason behind it in detail if you fast forward to 22:40.
I have attached my dataset here as an example. I want to do a meta-analysis
of proportions so the data doesn't have a control group. It includes a
moderator called studytype that divides the studies into two subgroups:
birth cohort and others.
Using R, the subgroup average effect sizes I calculated are the same as
obtained in CMA. *My question is that *how to use R to get the same overall
average effect size as calculated in CMA using different approaches?
My code:
dat=read.csv("data.csv",header=T,sep=",")
es=escalc(xi=cases,ni=total,measure="PLO",data=dat)
overall.es=rma(yi,vi,data=es,method="DL",weighted=TRUE)
pred=predict(overall.es,transf=transf.ilogit,digits=5)
print(pred,digits=5)
The overall average effect size:
pred ci.lb ci.ub cr.lb cr.ub
0.00042 0.00032 0.00057 0.00013 0.00135
The overall average effect size obtained above is derived when you don't do
subgrouping. In CMA, if you do subgrouping, the overall effect size will
change according to the approach you select. If you assume a common
among-study variance, the overall average will become 0.000430 with a 95%
CI [0.000307, 0.000602]; if you do not assume that, the overall average
will become 0.000453 with a 95% CI [0.000335, 0.000611], which are the
values I try to obtain in R* (I don't know how to do this, which is why I'm
asking this question).*
If assuming a common among-study variance component across subgroups:
studytype=rma(yi,vi,data=ies.logit,mods=~studytype,method="DL")
pred.studytype=predict(studytype,transf=transf.ilogit,digits=5)
print(pred.studytype[c(1,17)])
then the subgroup average effect sizes are:
pred ci.lb ci.ub cr.lb cr.ub
1 0.00034 0.00020 0.00061 0.00008 0.00142 #Birth cohort
17 0.00049 0.00032 0.00074 0.00012 0.00191 #Others
If not assuming a common among-study variance component across subgroups:
birthcohort=rma(yi,vi,data=ies.logit,subset=studytype=="Birth
cohort",method="DL")
others=rma(yi,vi,data=ies.logit,subset=studytype=="Others",method="DL")
pred.birthcohort=predict(birthcohort,transf=transf.ilogit,digits=5)
pred.others=predict(others,transf=transf.ilogit,digits=5)
print(pred.birthcohort,digits=5)
print(pred.others,digits=5)
then the subgroup average effect sizes are:
pred ci.lb ci.ub cr.lb cr.ub
0.00035 0.00016 0.00078 0.00005 0.00274
pred ci.lb ci.ub cr.lb cr.ub
0.00047 0.00034 0.00065 0.00017 0.00132
The screen shots I attached here shows the same results I obtained above.
Please let me know if my question makes sense. It's kind of difficult to
explain this very clearly in an email.
Thank you for your time!
Cheers,
Naike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-meta-analysis/attachments/20170816/9acaa6c0/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: data.csv
Type: text/csv
Size: 577 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-meta-analysis/attachments/20170816/9acaa6c0/attachment-0001.csv>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: two options you can select.jpg
Type: image/jpeg
Size: 28954 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-meta-analysis/attachments/20170816/9acaa6c0/attachment-0004.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: no subgrouping.jpg
Type: image/jpeg
Size: 38913 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-meta-analysis/attachments/20170816/9acaa6c0/attachment-0005.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: assume same variance.jpg
Type: image/jpeg
Size: 60860 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-meta-analysis/attachments/20170816/9acaa6c0/attachment-0006.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: do not assume same variance.jpg
Type: image/jpeg
Size: 57471 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-meta-analysis/attachments/20170816/9acaa6c0/attachment-0007.jpg>
More information about the R-sig-meta-analysis
mailing list