<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>FAQ/box</title><revhistory><revision><revnumber>9</revnumber><date>2013-03-08 10:18:09</date><authorinitials>localhost</authorinitials><revremark>converted to 1.6 markup</revremark></revision><revision><revnumber>8</revnumber><date>2007-01-25 15:50:58</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>7</revnumber><date>2006-11-28 14:52:07</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>6</revnumber><date>2006-07-27 12:20:12</date><authorinitials>pc0082.mrc-cbu.cam.ac.uk</authorinitials></revision><revision><revnumber>5</revnumber><date>2006-07-27 11:21:11</date><authorinitials>pc0082.mrc-cbu.cam.ac.uk</authorinitials></revision><revision><revnumber>4</revnumber><date>2006-07-27 11:17:10</date><authorinitials>pc0082.mrc-cbu.cam.ac.uk</authorinitials></revision><revision><revnumber>3</revnumber><date>2006-07-27 11:15:41</date><authorinitials>pc0082.mrc-cbu.cam.ac.uk</authorinitials></revision><revision><revnumber>2</revnumber><date>2006-07-27 11:15:14</date><authorinitials>pc0082.mrc-cbu.cam.ac.uk</authorinitials></revision><revision><revnumber>1</revnumber><date>2006-07-27 11:12:35</date><authorinitials>pc0082.mrc-cbu.cam.ac.uk</authorinitials></revision></revhistory></articleinfo><section><title>Clustered boxplots in SPSS</title><para>The interactive graphics in SPSS can be accessed from the menu by choosing graphs:interactive. It enables the availability of a greater range of graphics than are present using older, non-interactive graph options. An example is given below in SPSS syntax for one such enhancement: clustered boxplots. Further editing of the graph may be performed by clicking on particular parts of the outputted graph. </para><itemizedlist><listitem><para>A comprehensive list of examples illustrating the capabilities of interactive graphics in SPSS, with implementation details, is available in a downloadable pdf file at <ulink url="http://www.siue.edu/IUR/SPSS/SPSS%20Interactive%20Graphics%2010.0.pdf"/> </para></listitem></itemizedlist><para>[CUT AND PASTE THE SYNTAX IN THE BOX BELOW INTO A SPSS SYNTAX WINDOW AND RUN] </para><screen><![CDATA[set format f10.5.
Data list free/
Score group  sex.
Begin data
1 1 1
2 1 1
3 1 1
4 1 2
3 1 2
4 1 2
17 2 1
78 2 1
23 2 1
45 2 2
23 2 2
56 2 2
45 3 1
23 3 1
67 3 1
45 3 2
23 3 2
12 3 2
end data.
]]><![CDATA[
DEFINE !BOX (!POS !TOKENS(1)
                     / !POS !TOKENS(1)
                     / !POS !TOKENS(1)
                     / !POS !TOKENS(1)
                     / !POS !TOKENS(1)
                     / !POS !TOKENS(1)
                     / !POS !TOKENS(1)
                     / !POS !TOKENS(1)
                     / !POS !TOKENS(1)
                     / !POS !TOKENS(1)
                     / !POS !TOKENS(1)
                     / !POS !TOKENS(1)
                     / !POS !TOKENS(1)
                     / !POS !TOKENS(1)
                     / !POS !TOKENS(1)
                     / !POS !CMDEND).
]]><![CDATA[
]]><![CDATA[
VAR LABELS      !1      !4/
                           !2      !5/  
                           !3      !6/.
]]><![CDATA[
VALUE LABELS    !2        (1) !7
                                              (2) !8
                                              (3) !9
                                              (4) !10
                                              (5) !11/
                             !3         (1)  !12
                                             (2) !13
                                             (3) !14
                                             (4) !15
                                             (5) !16/.
IGRAPH /VIEWNAME='Boxplot' /X1 = VAR(!2) TYPE = CATEGORICAL /Y = VAR(!1)
  TYPE = SCALE  /STYLE = VAR(!3) /COORDINATE = VERTICAL  /X1LENGTH=3.0
 /YLENGTH=3.0 /X2LENGTH=3.0 /CHARTLOOK='NONE' /CATORDER VAR(!4) (ASCENDING
  VALUES OMITEMPTY) /CATORDER VAR(!2) (ASCENDING VALUES OMITEMPTY) /BOX
  OUTLIERS = ON EXTREME = ON MEDIAN = ON WHISKER = T.
EXE.
!ENDDEFINE.
]]><![CDATA[
* can pad out labels with as many * as required
]]><![CDATA[
* The line below can be adapted as required for specific data to * specify variable column names and their labels in the boxplot, * number of levels of each categorical variable and the names of * these levels to appear in the boxplot. It is set up for the 
* example data above. In the line below asterisks denote levels 
* of variables which are not present.
!BOX score group sex score gp gender BLACK WHITE OTHERS * *  M F * * *.]]></screen><para>* Multiple invocations of the macro in the same interactive session will produce the following note: </para><para>&gt;The macro name specified on the DEFINE command duplicates the name of a previously defined macro.  This instance will take precedence. </para><para>This warning does not indicate a problem and may be ignored. </para></section></article>