[R-meta] Mismatch between output from sub-group analysis and forest plot

Gerta Ruecker ruecker @end|ng |rom |mb|@un|-|re|burg@de
Tue Feb 11 19:30:51 CET 2020

Dear Joao,

There is another problem. You say that the output and the forest plot 
"have different values for the pooled estimates", but you've sent us 
only the code, not the output or the forest plot, at least I didn't find 
either of them. Thus, if we are expected to see what's wrong here you 
have to send us your results and, even better, the data to reproduce the 

One idea is that the results in the output may be transformed, while in 
the forest plot they are back-transformed, but I don't know.



Am 11.02.2020 um 19:20 schrieb Joao Afonso:
> Dear all,
> Sorry for the double posting and previous "messy" message. 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. The model is the following:
> iies.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, mods=~lcmbi=="Records", method="DL")
> pes.da.records=rma(yi, vi, data=ies.da.lcmbi, mods=~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)
> print(pes.da.records, digits=3)
> print(subganal.lcmbi, digits=3)
> print(pes.lcmbi, digits=3)
> 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()
> What could I be doing wrong? I will be extremely grateful for any help
> or guidance.
> Wishing all a great afternoon,
> Joao

Dr. rer. nat. Gerta Rücker, Dipl.-Math.

Institute of Medical Biometry and Statistics,
Faculty of Medicine and Medical Center - University of Freiburg

Stefan-Meier-Str. 26, D-79104 Freiburg, Germany

Phone:    +49/761/203-6673
Fax:      +49/761/203-6680
Mail:     ruecker using imbi.uni-freiburg.de
Homepage: https://www.imbi.uni-freiburg.de/persons/ruecker/person_view

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