[R] "continuous" boxplot?
rkoenker at uiuc.edu
Tue Oct 2 21:34:59 CEST 2007
If what is desired is a plot of conditional quantiles of y given x,
then loess plots of y on x binned on y is really not a good strategy.
You might try something like this:
x <- (0:1000/1000)*2*pi
y <- sin(2*x) + rnorm(1001)/5
plot(rqss(y ~ qss(x)),col="red")
plot(rqss(y ~ qss(x),tau=.1),col="red")
plot(rqss(y ~ qss(x),tau=.9),col="red")
url: www.econ.uiuc.edu/~roger Roger Koenker
email rkoenker at uiuc.edu Department of Economics
vox: 217-333-4558 University of Illinois
fax: 217-244-6678 Champaign, IL 61820
On Oct 2, 2007, at 1:57 PM, Bert Gunter wrote:
> I found the references in the previous replies to this vexing data
> visualization issue to be quite interesting and useful. I think it
> fair to
> say that there is no single "best" way to do this -- it all depends
> on what
> you need to learn , and probably several alternative displays will be
> necessary to get the important information the data have to convey.
> However,as always, this issue has been considered before, and it
> may be
> worthwhile to at least consider an already available "standard"
> using shingles and a trellis-type plot. ?xyplot and ?shingle should
> get you
> started (you probably want to shingle or bin on quantiles of y). The
> canonical reference is Bill Cleveland's VISUALIZING DATA (see
> Bert Gunter
> Genentech Nonclinical Statistics
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On
> Behalf Of Jim Porzak
> Sent: Tuesday, October 02, 2007 11:19 AM
> To: Karin Lagesen
> Cc: r-help at r-project.org
> Subject: Re: [R] "continuous" boxplot?
> I like to use bagplots in these cases where there are a lot of
> cases and
> scatter plots become one big smudge.
> And some further examples on slides 36 - 39 of
> Jim Porzak
> Responsys, Inc.
> San Francisco, CA
> On 10/1/07, Karin Lagesen <karin.lagesen at medisin.uio.no> wrote:
>> I have two vectors x and y, which I would like to plot against each
>> other. I am also displaying other data in this plot. However, I have
>> about 1 million points to plot, and just plotting them x againt y is
>> not very informative. What I'd like to do is to do sort of a
>> continuous box plot.
>> My x values goes from -1 to 1 and my y values from 0 to 1, so I4d
>> to plot the median and quantiles, and possibly also all of the
>> outliers somehow. Are there any facilities in R for doing something
>> like this, or would I need to do this the hard coded way?
>> Thankyou very much for your help!
>> Karin Lagesen, PhD student
>> karin.lagesen at medisin.uio.no
>> R-help at r-project.org mailing list
>> PLEASE do read the posting guide
>> and provide commented, minimal, self-contained, reproducible code.
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help