Description Usage Arguments Details Author(s) References See Also Examples
Boxpercentile strips give a compact illustration of a distribution. The width of the strip is proportional to the probability of a more extreme point. This function adds a boxpercentile strip to an existing plot.
1 2 3 4 
x 
Either the vector of points at which the probability is
evaluated (if 
prob 
Probability, or cumulative density, of the distribution
at 
at 
Position of the centre of the strip on the yaxis (if

width 
Thickness of the strip at its thickest point, which will be at the median. Defaults to 1/20 of the axis range. 
horiz 
Draw the strip horizontally ( 
scale 
Alternative way of specifying the thickness of the
strip, as a proportion of 
limits 
Vector of minimum and maximum values, respectively, at which to terminate the strip. 
col 
Colour to shade the strip, either as a builtin R
colour name (one of 
border 
Colour of the border, see 
lwd 
Line width of the border (defaults to

lty 
Line type of the border (defaults to

ticks 
Vector of 
tlen 
Length of the ticks, relative to the thickness of the strip. 
twd 
Line width of these marks (defaults to

tty 
Line type of these marks (defaults to

lattice 
Set this to 
... 
Other arguments passed to 
The boxpercentile strip looks the same as the boxpercentile plot
(Esty and Banfield, 2003) which is a generalisation of the boxplot for
summarising data. However, bpstrip
is intended for illustrating
distributions arising from parameter
estimation or prediction. Either the distribution is known
analytically, or an arbitrarily large sample from the distribution is
assumed to be available via a method such as MCMC or bootstrapping.
The function bpplot
in the Hmisc
package can be used to draw vertical boxpercentile plots of observed
data.
Christopher Jackson <[email protected]>
Jackson, C. H. (2008) Displaying uncertainty with shading. The American Statistician, 62(4):340347. http://www.mrcbsu.cam.ac.uk/personal/chris/papers/denstrip.pdf
Esty, W. W. and Banfield, J. D. (2003) The boxpercentile plot. Journal of Statistical Software 8(17).
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  x < seq(4, 4, length=1000)
prob < pnorm(x)
plot(x, xlim=c(5, 5), ylim=c(5, 5), xlab="x", ylab="x", type="n")
bpstrip(x, prob, at=1, ticks=qnorm(c(0.25, 0.5, 0.75)))
## Terminate the strip at specific outer quantiles
bpstrip(x, prob, at=2, limits=qnorm(c(0.025, 0.975)))
bpstrip(x, prob, at=3, limits=qnorm(c(0.005, 0.995)))
## Compare with density strip
denstrip(x, dnorm(x), at=0)
## Estimate the density from a large sample
x < rnorm(10000)
bpstrip(x, at=4)

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