[R-meta] logarithmic scale in forest plot
Viechtbauer, Wolfgang (SP)
wo||g@ng@v|echtb@uer @end|ng |rom m@@@tr|chtun|ver@|ty@n|
Wed Mar 4 16:56:45 CET 2020
Dear Antonia,
You should use log odds ratios as input. In fact, we never meta-analyze the odds ratios directly, because they are not 'symmetric' around 1. For example, an OR of 2 in favor of the treatment group corresponds to an OR of 1/2 = 0.5 in favor of the control group, so if one were to combine these two ORs (assuming equal weights), one would end up with a combined OR of 1.25 in favor of the treatment group, but this is not logical if the two ORs are exact opposites of each other. On the other hand, after log transformation, we get log(2) = 0.6931472 and log(0.5) = -0.6931472, which are now symmetric around 0. Hence, the combined log OR is 0 and, after back-transforming (i.e., exponentiation), we get exp(0) = 1, which makes sense.
Also, how were those standard errors (sei) computed? Are they really SEs of the ORs? In most cases, the SEs we can extract from papers are for the log odds ratios.
But to answer your question, here is how it's done. Plot the log odds ratios and then use atransf=exp, which in essence puts the the x-axis on a log scale. An example:
yi <- log(c(2, 0.5))
sei <- c(.20, .20)
forest(yi, sei=sei, atransf=exp, ylim=c(-0.5,5))
res <- rma(yi, sei=sei, method="FE")
addpoly(res, row=0)
(And I just saw that Michael has also answered with the same concern about the use of the ORs.)
Best,
Wolfgang
-----Original Message-----
From: R-sig-meta-analysis [mailto:r-sig-meta-analysis-bounces using r-project.org] On Behalf Of Antonia Sudkaemper
Sent: Wednesday, 04 March, 2020 15:37
To: r-sig-meta-analysis using r-project.org
Subject: [R-meta] logarithmic scale in forest plot
Dear Metafor Community,
I hope this email finds you well.
I have a question regarding the metafor package. I made a forest plot using
the code below. I have received feedback that, as the forest plot shows
odds ratios I should use a log scale for the x axis rather than a linear
scale, so that the CIs are symmetric around the natural log OR. I am not
sure how I would achieve that? Could you help me out, please? I would much
appreciate it.
All the best, Antonia
#race/ethnicity
oddsratio = c(2.07, 0.90, 1.00, 0.82, 2.25, 0.92)
sei <- c(.43, .32, .66, .50, .70, .44)
ci.lb <- oddsratio - 1.96*sei
ci.ub <- oddsratio + 1.96*sei
study<-c("Aelenei et al., 2019", "Kulich et al., 2019a", "Kulich et al.,
2006a", "Kulich et al., 2006b", "Ryan & Haslam, 2004a", "Ryan & Haslam,
2004b")
labels<-c(-2, 0, 2, 4, 6, 8)
forest(oddsratio, ci.lb=ci.lb, ci.ub=ci.ub, showweights=TRUE, refline=1,
xlab
= "Odds Ratio", slab=study, alim = c(-2,8), xlim=c(-14,15),
at=labels, cex =
0.9, ylim=c(-2,27))
addpoly(x = 1.16, ci.lb=0.69, ci.ub=1.95)
--
Dr Antonia Sudkämper
Researcher, OCR, Cambridge Assessment
www.antoniasudkaemper.com
a.sudkaemper using gmail.com
More information about the R-sig-meta-analysis
mailing list