Dataplot Vol 2 Vol 1

# DIFFERENCE OF QN

Name:
DIFFERENCE OF QN (LET)
Type:
Let Subcommand
Purpose:
Compute the difference of the Qn scale estimates for two response variables.
Description:
The Qn scale estimate is motivated by the Hodges-Lehmann estimate of location:

$$\hat{\mu} = \mbox{median} \frac{X_i + X_j} {2} \hspace{0.5in} 1 \le i \le j \le n$$

An analogous scale estimate can be obtained by replacing pairwise averages with pairwised distances:

$$\mbox{median} |X_i - X_j| \hspace{0.5in} i \le j$$

This estimate has high efficiency for normal data (86%), but a breakdown point of only 29%. Rousseeuw and Croux proposed the following variation of this statistic:

$$d \{ |X_i - X_j| \hspace{0.2in} i \le j \}_{(k)}$$

where d is a constant factor and k = $$\left( \begin{array}{c} h \\ 2 \end{array} \right)$$ which is approximately $$\left( \begin{array}{c} n \\ 2 \end{array} \right)$$. The value of h is [n/2]+1 (i.e., roughly half the number of obserations). In other words, we take k-th order statistic of the $$\left( \begin{array}{c} n \\ 2 \end{array} \right)$$ interpoint distances. The value of d is choosen to make Qn a consistent estimator of scale. We use the value 2.2219 since this is the value that makes Qn a consistent estimator for normal data.

Enter HELP QN SCALE for a more detailed discussion of the Qn scale estimate.

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

Syntax:
LET <par> = DIFFERENCE OF QN <y>
<SUBSET/EXCEPT/FOR qualification>
where <y> is the response variable;
<par> is a parameter where the computed difference of Qn scale estimates is stored;
and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
LET A = DIFFERENCE OF QN Y1
LET A = DIFFERENCE OF QN Y1 SUBSET TAG > 2
Note:
Dataplot uses code provided by Rousseeuw and Croux to compute the Qn estimate. This algorithm uses an efficient computational method for computing Qn.
Note:
The Rousseeuw and Croux article also proposes the Sn 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:
 QN SCALE = Compute the Qn scale estimate of a variable. SN SCALE = Compute the Sn 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 SN = Compute the difference of the Sn 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/04
Program:
SKIP 25
READ IRIS.DAT Y1 TO Y4 X
.
LET A = DIFFERENCE OF QN Y1 Y2
TABULATE DIFFERENCE OF QN Y1 Y2 X
.
MAJOR XTIC MARK NUMBER 3
MINOR XTIC MARK NUMBER 0
XTIC OFFSET 0.2 0.2
X1LABEL GROUP ID
Y1LABEL DIFFERENCE OF QN
CHARACTER X
LINE BLANK
DIFFERENCE OF QN PLOT Y1 Y2 X
CHARACTER X ALL
LINE BLANK ALL
BOOTSTRAP DIFFERENCE OF QN PLOT Y1 Y2 X

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

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

*****************************************
**  TABULATE DIFFERENCE OF QN Y1 Y2 X  **
*****************************************

*    Y1       AND Y2
X           *    DIFFERENCE OF QN
**********************************************
1.00000     *   -0.506639E-06
2.00000     *    0.206496
3.00000     *    0.206497


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

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