Next: colplot() Up: Graphics Macros Help File Previous: bargraph()   Contents

boxplot5num()

Usage:
boxplot5num(x [,names:Names][,excludeM:T] [,keep:T] \
  [,graphics keyword phrases]), x a REAL vector or a structure with
  REAL vector components, Names a CHARACTER scalar or vector



Keywords: distribution graphs
boxplot5num(x), where x is a REAL vector or a structure whose components
are REAL vectors, draws a simplified boxplot of a vector or side-by-side
simplified boxplots of the components of x.  These reflect only the 5
number summary (minimum, lower quartile, median, upper quartile and
maximum) and display no information on outliers.

The upper and lower quartiles are the medians of the upper and lower
halves of the data as computed by describe().  When the sample size is
odd, the median is included in both halves unless the value of option
'excludeM' is True.  See setoptions() and keyword 'excludeM' below.

The plot drawn is based on what is presented in David S. Moore, The
Basic Practice of Statistics.  To replicate plots in the book, you
should set option 'excludeM' to True or use keyword phrase 'excludeM:T'
as an argument.  See below.

boxplot5num(x,names:Names), where Names is a CHARACTER scalar or
vector, does the same, except Names is used to label the boxes.  If
Names is a scalar, say "School ", the plots will be labelled "School 1",
"School 2",... .  If Names is vector, than x must be a structure with
ncomps(x) = length(Names).

boxplot5num(x,excludeM:T [,names:Names]), does the same except the
quartiles are computed as the medians of the lower and upper halves
*excluding* the median.  This matches the definition in Moore's book.

boxplot5num(x, keep:T [,excludeM:T, names:Names]) does the same, but
also returns a vector or structure containing the 5 number summaries
(Min, Q1, Median, Q3, Max) for each box plot drawn.

You can also use most of the usual graphics keywords such as 'title',
'ylab', 'show', and 'window'.

See also boxplot() and vboxplot() which draw more elaborate boxplots.


Gary Oehlert 2003-01-15