[R] Impaired boxplot functionality - mean instead of median

Frank E Harrell Jr f.harrell at vanderbilt.edu
Fri Dec 2 11:01:15 CET 2005


Evgeniy Kachalin wrote:
> Frank E Harrell Jr ЃпЃиЃшЃеЃт:
> 
>> Evgeniy Kachalin wrote:
>>
>>> Marc Schwartz (via MN) ЃпЃиЃшЃеЃт:
>>>
>>>>> Marc Schwartz (via MN) ЃпЃиЃшЃеЃт:
> 
> 
>>>
>>
>> library(Hmisc)
>> library(lattice)
>> ?panel.bpplot
>>
>> bwplot(...., panel=panel.bpplot)
>>
>> By default, panel.bpplot shows the mean (dot) and median (line) plus 
>> several quantiles.  To bother Martin in a friendly way, I think that 
>> means  can be useful additions - not that they are so useful by 
>> themselves, but that when they differ a lot from the median, 
>> non-statisticians gain further information about asymmetry.  Also, 
>> even though the simple box plot is elegant, I sometimes think it has a 
>> high ink to information ratio.  I have gained a lot from seeing outer 
>> quantiles on the plot, and I don't like to show outer points for fear 
>> of someone labeling them outliers.  For describing raw data 
>> distributions, I never find standard deviations useful, however.
>>
> 
> => fa
>      doz fabp2
> 1    900     2
> 4   1500     2
> 6   1000     2
> 8    750     3
> 10   750     1
> 11  1750     2
> 12   500     3
> ....
> ....
> ....
> ....
> 
> 
>  > bwplot(doz~factor(fabp2),data=fa,panel=panel.bpplot)
> Error in sort(x, partial = unique(c(lo, hi))) :
>         unsupported options for partial sorting
> 
> 
> That's NOT simple way.
> 
> I need just one change.
> Is there any good way?

No, not without reading the documentation to bwplot.

FH

> $-(
> 


-- 
Frank E Harrell Jr   Professor and Chair           School of Medicine
                      Department of Biostatistics   Vanderbilt University




More information about the R-help mailing list