In package metafor, consider the code below for a forest plot of odds ratios:
res = rma(measure = "OR", ai = TP, bi = FP, ci = FN, di = TN, data = data1, method="PM")
forest(res, atransf = exp)
Now how can I set the first position of the
x-axis tick marks to 0? I know I should use atransf = exp
for plotting
odds ratios and also at = log(b)
where b
is a vector of values. I just
don't know which number should be set as the first element of b
, so that
it gives back 0 as the first tick mark for odds ratios.
I also wonder how I can change the default title at the bottom of the forest plot. In case of odds ratio it is "Odd Ratio (log scale)". I prefer it to be "Odds Ratio".
What you are asking for is impossible. On the log scale, an odds ratio of 0 would have to be an infinite amount of space to the left (try at=log(c(1e-10,1,5))
to see what happens if you use a number very close to 0). That is obviously not going to work.