SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Contacts SED Projects SED Products and Publications Search SED Pages
Dataplot Vol 1 Auxiliary Chapter

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:

      Sn = c*MEDIAN(i){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:
    In addition, the Sn statistic is supported for the following plots and commands

      DIFFERENCE OF SN PLOT Y1 Y2 X
      CROSS TABULATE DIFFERENCE OF SN PLOT Y1 Y2 X1 X2
      BOOTSTRAP DIFFERENCE OF SN PLOT Y1 Y2
      JACKNIFE DIFFERENCE OF SN PLOT Y1 Y2

      TABULATE DIFFERENCE OF SN Y X
      CROSS TABULATE SN Y X1 X2
      LET Z = CROSS TABULATE DIFFERENCE OF SN Y X1 X2

Default:
    None
Synonyms:
    None
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.
    STATISTIC PLOT = Generate a statistic versus subset plot.
    CROSS TABULATE PLOT = Generate a statistic versus subset plot (two subset variables).
    BOOTSTRAP PLOT = Generate a bootstrap plot for a statistic.
Reference:
    "Alternatives to the Median Absolute Deviation", Peter J. Rousseuw and Christophe Croux, Journal of the American Statistical Association, December, 1993, Vol. 88, No. 424, pp. 1273-1283.

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

Applications:
    Data Analysis
Implementation Date:
    2003/5
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
        
    plot generated by sample program

    plot generated by sample program

Date created: 5/21/2003
Last updated: 5/21/2003
Please email comments on this WWW page to alan.heckert@nist.gov.