Boxplots with log-scaled y-axis: origin at 1

226 views
Skip to first unread message

lars

unread,
Jul 3, 2008, 6:15:45 PM7/3/08
to CorpLing with R
Here is another question on odds ratios... I would like to diagram
them in a barplot in R. Benedikt (p.c.) assures me that they are best
shown when the y-axis is log-scaled - because disfavoring values are
all between 0 and 1, but favoring values can be anywhere above 1.

Log-scaling the y-axis seems to be no problem:
barplot(oddsratios, log="y")

But you would want the origin of the graph to move up to 1, so that
disfavoring effects, with a value between 0 and 1, are shown in boxes
that go down rather than up. And R does not do this just by using
log="y" in the plot command.

After much fruitless searching online, I am wondering if one of you
might know how to do this?

Stefan Th. Gries

unread,
Jul 3, 2008, 6:44:57 PM7/3/08
to corplin...@googlegroups.com
Can't you plot log odds in the boxplot so that the range of values is
from -Inf (strongest negative effect ever) over 0 (neutral) to +Inf
(strongest positive effect ever)?
STG
--
Stefan Th. Gries
-----------------------------------------------
University of California, Santa Barbara
http://www.linguistics.ucsb.edu/faculty/stgries
-----------------------------------------------
Reply all
Reply to author
Forward
0 new messages