Description Usage Arguments Details Value Author(s) References See Also Examples
Calculates and plots a univariate highest density regions boxplot.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 
x 
Numeric vector containing data or a list containing several vectors. 
prob 
Probability coverage required for HDRs

h 
Optional bandwidth for calculation of density. 
lambda 
BoxCox transformation parameter where 
boxlabels 
Label for each box plotted. 
col 
Colours for regions of each box. 
main 
Overall title for the plot. 
xlab 
Label for xaxis. 
ylab 
Label for yaxis. 
pch 
Plotting character. 
border 
Width of border of box. 
outline 
If not <code>TRUE</code>, the outliers are not drawn. 
space 
The space between each box, between 0 and 0.5. 
... 
Other arguments passed to plot. 
The density is estimated using kernel density estimation. A BoxCox
transformation is used if lambda!=1
, as described in Wand, Marron and
Ruppert (1991). This allows the density estimate to be nonzero only on the
positive real line. The default kernel bandwidth h
is selected using
the algorithm of Samworth and Wand (2010).
Hyndman's (1996) density quantile algorithm is used for calculation.
nothing.
Rob J Hyndman
Hyndman, R.J. (1996) Computing and graphing highest density regions. American Statistician, 50, 120126.
Samworth, R.J. and Wand, M.P. (2010). Asymptotics and optimal bandwidth selection for highest density region estimation. The Annals of Statistics, 38, 17671792.
Wand, M.P., Marron, J S., Ruppert, D. (1991) Transformations in density estimation. Journal of the American Statistical Association, 86, 343353.
1 2 3 4 5 6 7 8 9 10 11 12 13 14  # Old faithful eruption duration times
hdr.boxplot(faithful$eruptions)
# Simple bimodal example
x < c(rnorm(100,0,1), rnorm(100,5,1))
par(mfrow=c(1,2))
boxplot(x)
hdr.boxplot(x)
# Highly skewed example
x < exp(rnorm(100,0,1))
par(mfrow=c(1,2))
boxplot(x)
hdr.boxplot(x,lambda=0)

Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.