In the Hmisc library there is a function panel.bpplot that extends bwplot to
allow for box-percentile plots that do what you want. By default the following
coverage intervals are displayed (with progressively narrower boxes):
25% 50% 75% 90% (e.g. 50% = outer quartiles) but you can specify any quantiles
that you want, including a continuous display of say 101 percentiles to arrive
at
a Banfield-type box-percentile plot. You can also display the mean with a dot.
I am not a big fan of "outer values" so those by default are not shown.
Example: bwplot(year ~ ratio, panel=panel.bpplot, ...options...)
-------------------------------------------------------------------------------------------
Frank E Harrell Jr
Professor of Biostatistics and Statistics
Division of Biostatistics and Epidemiology
Department of Health Evaluation Sciences
University of Virginia School of Medicine
hesweb1.med.virginia.edu/biostat
-----Original Message-----
From: Sormani Philippe <sormani@brainsoft.ch>
To: 's-news@wubios.wustl.edu' <s-news@wubios.wustl.edu>
Date: Wednesday, April 21, 1999 2:09 AM
Subject: [S] bowplot in s-plus, whiskers defined as percentile limits
>
>
>We are using S-Plus 4.5 Professionnal Release 2 on Windows NT v4.0.
>
>We can neither solve nor find a description to the following problem in
>S-Plus, which is solved very elegantly in Statistica. Since we are
>convinced there is a S-Plus solution, we would appreciate anybody's
>help.
>
>The problem:
>We want to make categorised box plots off one variable. The category X
>would be the year {1994, 1995, 1996, 1997, 1998} and the variable Y
>would be a ratio calculated for one year X and a given set of
>instrument. The set is not necesarily the same every year. Let's say for
>example it has 600 ratios in 1994, 650 in 1995, 800 in 1996, 1200 in
>1997 and 1333 in 1998. So each box and whisker plot represents a subset
>of a different size.
>
>For each box, we want the median and the quartiles drawn as is
>automatically, but the whiskers should cut at a given percentile (e.g.5%
>and 95% or 10% and 90%), and not at the standard 1.5 time the
>inter-quartile range (see DETAILS in the help on the "boxplot"
>function).
>
>How can we do it ?
>
>Thanks for your help.
>
>Philippe Sormani & Donato Scognamiglio
>
>
>-----------------------------------------------------------------------
>This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
>send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
>message: unsubscribe s-news
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|