[R] Odp: boxplot from mean and SD data

peter dalgaard pdalgd at gmail.com
Wed Aug 24 16:13:35 CEST 2011


On Aug 24, 2011, at 13:18 , Petr PIKAL wrote:

> Hi
>> 
>> Dear all,
>> 
>> I have a dataset of 3 categorical factors, the mean and the standard 
>> deviation of each value. I want to use these values to plot a boxplot, 
>> grouped by each of the 3 categorical factors (24 boxplots in total). I 
>> don't have a clue on how to do the boxplot from mean and SD data already 
> calculated.
> 
> I am afraid that you can not do it.

Or, you can't do it without modifying the definition of a boxplot. There are variations in which the box is mean +/- 2SD and the whiskers show the range, but I consider that a doubleplusungood idea -- box plots should be box plots! 

> Only if you you accept assumption that 
> distribution within each factor is normal and therefore median equals 
> mean. You can than also use 25 an 75 percentile for box construction.
> 
> see ?boxplot and ?bxp for internals of plotting function.
> 
> One possibility also is to generate values by mean and sd parameters to 
> rnorm, although I do not see the reason for doing it.
> 
> Regards
> Petr
> 
> 
>> 
>> Thanks in advance
>> 
>> 
>>   [[alternative HTML version deleted]]
>> 
>> ______________________________________________
>> R-help at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide 
> http://www.R-project.org/posting-guide.html
>> and provide commented, minimal, self-contained, reproducible code.
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com
"Døden skal tape!" --- Nordahl Grieg



More information about the R-help mailing list