[R-meta] Mismatch between output from sub-group analysis and forest plot
Joao Afonso
jot@|on@o @end|ng |rom gm@||@com
Wed Feb 12 11:47:03 CET 2020
Dear all,
Once again I am sorry for posting this message again but I forgot to
send the outputs.
Again I am conducting a meta-analysis on prevalence and incidence
data. As there is plenty of heterogeneity I am doing a sub-group
analysis. However I
am finding the output of the same and forest plots produced to have
different values for the pooled estimates. I am using the double
arcsine transformation and then have the data back-transformed to
produce the estimates. I have amended the model following Wofgang's
reply, but the problem still remains.The updated model is the
following:
ies.da.lcmbi<-ies.da %>%
filter(is.na(lcmbi)==FALSE)
subganal.lcmbi=rma(yi, vi, data=ies.da.lcmbi, mods=~lcmbi, method="DL")
pes.da.lcm=rma(yi, vi, data=ies.da.lcmbi, subset = lcmbi=="Records",
method="DL")
pes.da.records=rma(yi, vi, data=ies.da.lcmbi, subset =
lcmbi=="Locomotion Scoring Method", method="DL")
pes.subg.lcmbi=predict(subganal.lcmbi,
transf=transf.ipft.hm,
targ=list(ni=prevalence_2020_cow_nomv$ssizeanimal))
dat.samevar=data.frame(estimate=c((pes.da.lcm$b)[1], (pes.da.records$b)[1]),
stderror=c((pes.da.lcm$se)[1], (pes.da.records$se)[1]),
tau2=subganal.lcmbi$tau2)
pes.da.lcmbi=rma(estimate, sei=stderror,
method="DL",
data=dat.samevar)
pes.lcmbi=predict(pes.da.lcmbi, transf=transf.ipft.hm,
targ=list(ni=prevalence_2020_cow_nomv$ssizeanimal))
print(pes.da.lcm, digits=3) #display subgroup 1 summary effect size
print(pes.da.records, digits=3) #display subgroup 2 summary effect size
print(subganal.lcmbi, digits=3) #display subgroup analysis results
print(pes.lcmbi, digits=3) #display recomputed summary effect size
Which produces the following output:
Random-Effects Model (k = 11; tau^2 estimator: DL)
tau^2 (estimated amount of total heterogeneity): 0.027 (SE = 0.021)
tau (square root of estimated tau^2 value): 0.164
I^2 (total heterogeneity / total variability): 99.93%
H^2 (total variability / sampling variability): 1428.81
Test for Heterogeneity:
Q(df = 10) = 14288.143, p-val < .001
Model Results:
estimate se zval pval ci.lb ci.ub
0.506 0.051 9.905 <.001 0.406 0.606 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> print(pes.da.records, digits=3) #display subgroup 2 summary effect size
Random-Effects Model (k = 22; tau^2 estimator: DL)
tau^2 (estimated amount of total heterogeneity): 0.011 (SE = 0.007)
tau (square root of estimated tau^2 value): 0.104
I^2 (total heterogeneity / total variability): 99.23%
H^2 (total variability / sampling variability): 130.14
Test for Heterogeneity:
Q(df = 21) = 2732.942, p-val < .001
Model Results:
estimate se zval pval ci.lb ci.ub
0.600 0.024 25.359 <.001 0.553 0.646 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> print(subganal.lcmbi, digits=3) #display subgroup analysis results
Mixed-Effects Model (k = 33; tau^2 estimator: DL)
tau^2 (estimated amount of residual heterogeneity): 0.022 (SE = 0.013)
tau (square root of estimated tau^2 value): 0.148
I^2 (residual heterogeneity / unaccounted variability): 99.82%
H^2 (unaccounted variability / sampling variability): 549.07
R^2 (amount of heterogeneity accounted for): 29.36%
Test for Residual Heterogeneity:
QE(df = 31) = 17021.085, p-val < .001
Test of Moderators (coefficient 2):
QM(df = 1) = 2.899, p-val = 0.089
Model Results:
estimate se zval pval ci.lb ci.ub
intrcpt 0.601 0.033 18.449 <.001 0.537 0.665 ***
lcmbiRecords -0.096 0.056 -1.703 0.089 -0.207 0.015 .
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> print(pes.lcmbi, digits=3) #display recomputed summary effect size
pred ci.lb ci.ub cr.lb cr.ub
0.283 0.206 0.368 0.168 0.415
And to produce the forest plot I use the following code:
subganal.lcmbi=rma(yi, vi, data=ies.da.lcmbi, mods=~lcmbi, method="DL")
pes.summary=metaprop(nlameanimal, ssizeanimal, author, data=ies.da.lcmbi,
sm="PFT",
method.tau="DL",
method.ci="NAsm",
byvar=lcmbi,
tau.common=TRUE,
tau.preset=sqrt(subganal.lcmbi$tau2))
precision=sqrt(ies.da.lcmbi$vi)
jpeg(file="forest_cow_cow_lcmbi.jpeg", width=11, height=12, units="in", res=300)
forest(pes.summary,
xlim=c(0,1),
pscale=1,
rightcols=FALSE,
leftcols=c("studlab", "effect", "ci"),
leftlabs=c("Study", "Prevalence", "95% C.I."),
text.random="Prevalence of Lameness in British Dairy Cattle",
bylab = "Lameness Data Source",
print.byvar = TRUE,
xlab="Prevalence of Lameness", smlab="",
weight.study="random", squaresize=0.5, col.square="navy",
col.diamond="maroon", col.diamond.lines="maroon",
pooled.totals=FALSE,
comb.fixed=FALSE,
fs.hetstat=10,
print.tau2=TRUE,
print.Q=TRUE,
print.pval.Q=TRUE,
print.I2=TRUE,
digits=2,
sortvar = precision)
dev.off()
The forest plot follows attached.
Again I will be extremely grateful for any help
or guidance.
Wishing all a great day,
Joao
-
João Afonso
DVM, MSc Veterinary Epidemiology
PhD Student
Department of Infection and Global Health
University of Liverpool
+351914812305
-------------- next part --------------
A non-text attachment was scrubbed...
Name: forest_cow_cow_lcmbi_brah.jpeg
Type: image/jpeg
Size: 144106 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-meta-analysis/attachments/20200212/e06a4297/attachment-0001.jpeg>
More information about the R-sig-meta-analysis
mailing list