SURVO MM Help System (web edition)

/BOXPLOT <data>,<xvar>,<yvar>                    / K.Vehkalahti 1996,2001,2008
plots side by side box plots of <data>.
There are new options (TEMPLATE and PLOTDATA), see below! 

Either one of <xvar> and <yvar> is assumed to be measured and the other
one is assumed to give the grouping. By default <yvar> is the measured
variable and <xvar> is a qualitative variable having at most 30 distinct
values. (Change by CLASSMAX=k, if necessary.) The box-and-whisker plots of
<yvar> are created for all values of <xvar>. However, if <yvar> is qualitative
and <xvar> measured, the roles of the variables are interchanged. The boxes
are then drawn horizontally instead of the default, vertical layout.

In any case, the <data> can be restricted by the IND, CASES and SELECT
specifications. VARS or MASK may be used to point a label variable (for
identifying outliers).

First the <xvar> and <yvar> are copied to a work file. If a label variable
has been activated by `L' mask or given by a LABEL specification (or if the
first variable in <data> is of string (S) type), it will also be copied to
the work file. Then the work file is sorted and aggregated according to the
grouping variable. The files are created in the directory of temporary files.

Box plots are based on certain order statistics: the median, the quartiles
Q1 and Q3, the minimum and the maximum. The boxes are drawn from the lower
quartile (Q1) to the upper quartile (Q3). The lines inside the boxes represent
the medians. By default, the whiskers are drawn to the nearest values not
beyond a standard span from the quartiles. Points beyond (outliers) are drawn
individually. Giving RANGE=0 forces the whiskers to the full data range. Any
positive value of RANGE multiplies the standard span by that amount. The
standard span is 1.5*(Q3-Q1).

In addition to the order statistics, the arithmetic means are computed
and marked by a cross on the box.

The width of a box is 2/3 by default. It can be altered by specification
WIDTH, for example WIDTH=0.4 . Giving WIDTH=N scales the boxes proportional to
the number of the observations in that group. An additional parameter c may be
given (like WIDTH=N,c) to make boxes wider or narrower. The default value of c
is 1/(1+1/k)*sqrt(k), where k is the # of classes in the grouping variable.

Small staples are drawn in the end of the whiskers. The default length of
the staples is (max-min)/100, where min and max are the minimum and maximum
values of the scale of the continuous variable. Any positive value of STAPLES
divides this length by that amount.

By default the sucro gives the user a ready made work scheme, where various
parameters can be modified, and the picture then easily re-produced.
A PostScript version of the picture can be created from that scheme by one
sucro command as well. A new TEMPLATE option on the following page! 

The specifications in the  GLOBAL  subfield may be freely modified.
For example, the XDIV or YDIV specification could be changed, if there is not
enough space for the boxes. Also new specifications may be added. If a label
variable was supplied, the possible outliers can be identified just by
modifying the *Outlier specification, and activating the /ACTIVATE sucro
command, which re-produces the picture in the next graphics window.

.............................
Examples:
/BOXPLOT FINLAND Province Tax
.............................
/BOXPLOT FINLAND Tax Province / WIDTH=N,10 RANGE=0 STAPLES=0
...........................................................................
New: by giving PLOTDATA=1 and TEMPLATE=1 
the sucro creates templates for PS and EMF plotting as well as three data
files in the working directory. The names of the data sets can be changed
by DATANAME specification.

The templates can be freely edited according to needs, and the subsequent
calls may omit the TEMPLATE specification. Then, only the data sets will
be recreated.

Example:
PLOTDATA=1 TEMPLATE=1
/BOXPLOT FINLAND Province Tax

  P = More information on composite plots 


More information on Survo from www.survo.fi
Copyright © Survo Systems 2001-2012.
webmaster'at'survo.fi