 Dataplot Vol 1 Vol 2

# CLASSIFICATION STATISTIC PLOT

Name:
CLASSIFICATION PLOT
Type:
Graphics Command
Purpose:
Generates a classification plot for a given statistic.
Description:
A dex statistic plot is a graphical method for representing a design of experiment problem. The first variable is a response variable while the remaining variables (must be at least one) represent levels of factors. A separate subplot is drawn for each factor with the subplot for factor k centered horizontally at x=k. Each subplot has a given horizontal width (defined by the DEX WIDTH command, defaults to 0.5). For example, the subplot for factor 2 ranges from 1.75 to 2.25 on the horizontal axis. The levels of the factor are assigned an x coordinate within this range (from lowest to highest). Then within each subplot:

 Vertical axis = value of the computed statistic from the response variable (i.e., compute the statistic for all values with the same level for a given factor); Horizontal axis = value of the level of a given factor.

The classification statistic plot reverses the role of the reponse variable and the factor variables. For the classification statistic plot, the Y axis variable is assumed to be qualitative (i.e., a specific number of levels) and the factor variables are assumed to be continuous (the plot will still work if some of the factor variables are also qualitative). The context is the common classification problem where we use the values of the factor variables to classify which group an observation belongs to.

For this plot, the subplots are based on the distinct levels of the response variable. For example, suppose the Y axis variable (Y) has two possible values. Then for the first factor variable (X1), we plot the values of X1 corresponding to Y = 1 with x-coordinate 0.8 and the we plot the values of X1 corresponding to Y = 2 with x-coordinate 1.2. A similar subplot is created for each factor variable.

Although this plot can be generated with any univariate statistic supported by Dataplot, it is most typically used for a location statistic such as the mean or the median.

This plot graphically shows the following:

1. How the statistic for the factor variable varies with the level of the response variable.

2. How the statistic for the levels of the response variable varies between the factor variables.
Syntax:
CLASSIFICATION <stat> PLOT <y> <x1> ... <xk>
<SUBSET/EXCEPT/FOR qualification>
where <y> is the (qualitative) response variable;
<x1> ... <xk> is a list of 1 to k factor variables;
<stat> is the desired statistic;
and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
CLASSIFICATION MEAN PLOT Y X1 X2
CLASSIFICATION MEAN PLOT Y X1 TO X8
CLASSIFICATION MEDIAN PLOT Y X1 X2
CLASSIFICATION SD PLOT Y X1 X2 X3
Note:
For a list of the supported statistics enter

Only statistics based on a single response variable are available with the CLASSIFICATIONS STATISTIC PLOT.

Note:
The TO syntax is allowed for the list of factor variables (see the EXAMPLES above).
Note:
The CHARACTER and LINE settings can be used to control the appearance of the plot. The first trace is typically drawn with a blank line and some type of character set (the choice of character is a matter of user preference). The second trace draws a horizontal line at the value for the specified statistic for the entire response variable. This is typically drawn with a blank character and a solid line (some analysts may prefer a dashed or dotted line). In any event, the user must explicitly set character and line settings (they default to all lines solid and all characters blank).
Default:
None
Synonyms:
None
Related Commands:
 CLASSIFICATION SCATTER PLOT = Generates a classification scatter plot. DEX SCATTER PLOT = Generates a dex scatter plot. DEX ... PLOT = Generates a dex plot for a statistic. DEX WIDTH = Specifies the width of levels in a dex plot. LINES = Sets the type for plot lines. CHARACTER = Sets the type for plot characters
Applications:
Classification
Implementation Date:
2019/03
Program:
```
case asis
title case asis
label case asis
title offset 2
set write decimals 3
.
. Step 1:   Read the data
.
SKIP 25
READ IRIS.DAT X1 TO X4 Y
SKIP 0
.
. Step 2:   Set plot control features
.
CHARACTERS X BLANK
LINES SOLID SOLID
LET NFACT = 4
XLIMITS 1 NFACT
MAJOR XTIC MARK NUMBER NFACT
MINOR XTIC MARK NUMBER 0
TIC MARK OFFSET UNITS DATA
XTIC OFFSET 1 1
XTIC LABEL FORMAT ALPHA
XTIC LABEL CONTENT 1sp()2sp()3cr()Sepalcr()Length 1sp()2sp()3cr()Sepalcr()Width ...
1sp()2sp()3cr()Petalcr()Length 1sp()2sp()3cr()Petalcr()Width
X1LABEL DISPLACEMENT 15
X1LABEL FACTORS
.
. Step 3:   Generate plots
.
TITLE Classification Mean Plot
CLASSIFICATION MEAN PLOT Y X1 X2 X3 X4
```

NIST is an agency of the U.S. Commerce Department.

Date created: 03/14/2019
Last updated: 03/14/2019