[R] sample weight for box plot?

David Winsemius dwinsemius at comcast.net
Thu Oct 29 12:38:19 CET 2009

On Oct 28, 2009, at 8:00 PM, Sean Parks wrote:

> Hi,
> I would like to make a box and whisker plot but use a sample weight  
> for each
> observation.  I've searched around a bit and have not found a method  
> of
> doing this.
> Anyone have any advice?

There are a variety of ways to get weighted quantiles. Two that have  
come up in recent r-help postings are the facilities in the quantreg  
package and wtd.quantile in Hmisc. Once you have calculated the five  
numbers that define a box-whisker plot they can be passed to bxp.


David Winsemius, MD
Heritage Laboratories
West Hartford, CT

More information about the R-help mailing list