 Dataplot Vol 2 Vol 1

# DIFFERENCE OF SN

Name:
DIFFERENCE OF SN (LET)
Type:
Let Subcommand
Purpose:
Compute the difference the Sn scale estimates for two response variables.
Description:
The Sn scale estimate is a robust estimate of scale that is defined as:

$$S_{n} = c \mbox{Median}_{i} \{\mbox{Median}_{j} |x_{i} - x_{j}| \}$$

That is, for each i we compute the median of {|xi - xj| j = 1, ..., n}. The median of these n numbers is then the estimate of Sn. The constant c is determined to make Sn a consistent estimator. The value used is 1.1926 (this is the value needed to make Sn a consistent estimator for data from a normal distribution).

The Sn statistic measures typical distances between values (in contrast to the median absolute deviation and the standard deviation which measure the distance from a central location).

Enter HELP SN SCALE for a more detailed discussion of the Sn scale estimate.

For the difference of Sn scale estimates, the Sn scale estimate is computed for each of the two samples then their difference is taken.

Syntax:
LET <par> = DIFFERENCE OF SN <y>
<SUBSET/EXCEPT/FOR qualification>
where <y> is the response variable;
<par> is a parameter where the computed difference of Sn scale statistics is stored;
and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
LET A = DIFFERENCE OF SN Y1 Y2
LET A = DIFFERENCE OF SN Y1 Y2 SUBSET TAG > 2
Note:
Dataplot uses code provided by Rousseeuw and Croux to compute the Sn estimate. This algorithm uses an efficient computational method for computing Sn.
Note:
The Rousseeuw and Croux article (see the Reference section below) also proposes the Qn scale estimate. The article discusses the properties of both estimators in detail.
Note:
Dataplot statistics can be used in a number of commands. For details, enter

Related Commands:
 SN SCALE = Compute the Sn scale estimate of a variable. QN SCALE = Compute the Qn scale estimate of a variable. DIFFERENCE OF MAD = Compute the difference of the median absolute deviations between two variables. DIFFERENCE OF IQ RANGE = Compute the difference of iq ranges between two variables. DIFFERENCE OF SD = Compute the difference of standard deviations between two variables. DIFFERENCE OF QN = Compute the difference of the Qn scale estimates between two variables. STATISTICS PLOT = Generate a statistic versus subset plot. BOOTSTRAP PLOT = Generate a bootstrap plot. TABULATE = Perform a tabulation for a specified statistic.
Reference:
Peter J. Rousseuw and Christophe Croux (1993), "Alternatives to the Median Absolute Deviation," Journal of the American Statistical Association, Vol. 88, No. 424, pp. 1273-1283.

Mosteller and Tukey (1977), "Data Analysis and Regression: A Second Course in Statistics," Addison-Wesley, pp. 203-209.

Applications:
Data Analysis
Implementation Date:
2003/05
Program:
SKIP 25
READ IRIS.DAT Y1 TO Y4 X
.
LET A = DIFFERENCE OF SN Y1 Y2
TABULATE DIFFERENCE OF SN Y1 Y2 X
.
XTIC OFFSET 0.2 0.2
MAJOR XTIC MARK NUMBER 3
MINOR XTIC MARK NUMBER 0
X1LABEL GROUP ID
Y1LABEL DIFFERENCE OF SN
CHARACTER X
LINE BLANK
DIFFERENCE OF SN PLOT Y1 Y2 X
CHARACTER X ALL
LINE BLANK ALL
BOOTSTRAP DIFFERENCE OF SN PLOT Y1 Y2 X

Dataplot generated the following output.
       **************************************
**  LET A = DIFFERENCE OF SN Y1 Y2  **
**************************************

THE COMPUTED VALUE OF THE CONSTANT A             =  0.47704038E+00

*****************************************
**  TABULATE DIFFERENCE OF SN Y1 Y2 X  **
*****************************************

*    Y1       AND Y2
X           *    DIFFERENCE OF SN
**********************************************
1.00000     *   -0.298023E-06
2.00000     *    0.238520
3.00000     *    0.357780 NIST is an agency of the U.S. Commerce Department.

Date created: 05/21/2003
Last updated: 11/12/2015