[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 11 12:06:22 CET 2020
Yes. (I used method="FE" because there were only 2 studies in the toy example, so it would be asking a bit much to fit a random-effects model IMHO.)
Best,
Wolfgang
-----Original Message-----
From: Antonia Sudkaemper [mailto:a.sudkaemper using gmail.com]
Sent: Wednesday, 11 March, 2020 11:29
To: Viechtbauer, Wolfgang (SP)
Cc: r-sig-meta-analysis using r-project.org
Subject: Re: [R-meta] logarithmic scale in forest plot
Thank you - now it loos right! :)
Just to double check - if I wanted to run the analysis with a random effects model, rather than a fixed effects model, would I just delete the "method="FE""? This is what I understand from the metafor package CRAN, but I might have misunderstood.
Thank you for clarifying.
All the best, Antonia
On Mon, 9 Mar 2020 at 16:15, Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer using maastrichtuniversity.nl> wrote:
Ah, sorry, I meant to write:
addpoly(res, row=0, atransf=exp)
Then it's correct (i.e., everything in the plot is then shown as odds ratios). Apologies for the confusion.
Best,
Wolfgang
-----Original Message-----
From: Antonia Sudkaemper [mailto:a.sudkaemper using gmail.com]
Sent: Monday, 09 March, 2020 17:11
To: Viechtbauer, Wolfgang (SP)
Cc: r-sig-meta-analysis using r-project.org
Subject: Re: [R-meta] logarithmic scale in forest plot
Hello Wolfgang,
thank you, and apologies - mailing list is now cc'ed in.
What confuses me, however, it that for the average the numbers on the right seem to indicate the log odds ratio (i.e. 0), but the poly in the graph seems to show the odds ratio (i.e. 1) - I would have expected these to be congruent?
Also, for "Study 1" and "Study 2", do the numbers and the graph display the odds ratio or log odds ratio? Based on the numbers and the back transformation I am assuming the odds ratio?
Thank you very much!
All the best, Antonia
On Mon, 9 Mar 2020 at 15:31, Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer using maastrichtuniversity.nl> wrote:
Please always cc the mailing list.
For log odds ratios, the CI can be negative. After back-transformation (i.e., exponentiation), the CI will be >= 0.
Similarly, the estimated average log odds ratio is 0 in the example. Hence, after back-transformation, the estimate will be 1 (exp(0) = 1).
Best,
Wolfgang
-----Original Message-----
From: Antonia Sudkaemper [mailto:a.sudkaemper using gmail.com]
Sent: Monday, 09 March, 2020 15:05
To: Viechtbauer, Wolfgang (SP)
Subject: Re: [R-meta] logarithmic scale in forest plot
Hello Wolfgang,
I just ran this with our data and it seems to work - thank you so much!
I just noticed that both in your example as well as with our data the mean weighted effect size lower CI is below 0 - does that make sense?
Also, in your example and similar with our data, it says 0.00 as mean weighted effect size, but shows up in the graph at 1. Is that correct?
Thanks again for your help.
All the best, Antonia
On Wed, 4 Mar 2020 at 15:56, Viechtbauer, Wolfgang (SP) <wolfgang.viechtbauer using maastrichtuniversity.nl> wrote:
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
More information about the R-sig-meta-analysis
mailing list