 Dataplot Vol 2 Vol 1

# QUANTILE STANDARD ERROR

Name:
QUANTILE STANDARD ERROR (LET)
Type:
Let Subcommand
Purpose:
Compute the standard error for a user specified quantile for a variable.
Description:
The qth quantile of a data set is defined as that value where a q fraction of the data is below that value and (1-q) fraction of the data is above that value. For example, the 0.5 quantile is the median.

Dataplot supports two methods for computing the quantile. The first method is the conventional method based on the order statistic. The second method, called the Herrell-Davis method, is based on using all the order statistics. The standard error methods given here only apply to the first method.

Two methods for obtaining the standard errors for the quantiles are supported.

The first method, called the Maritz-Jarrett method, is computed for the variable X and the desired quantile q as follows:

1. Sort the X in ascending order.

2. Let m = [q*n + 0.5] (i.e., round down to the nearest integer).

3. A = m - 1

4. B = n - m

5. Wi = BETCDF(i/n,A,B) - BETCDF((i-1)/n,A,B) where BETCDF is the beta cumulative distribution function with shape parameters A and B.

6. $$C_k = \sum_{i=1}^{n}{W_{i}X_{i}^{k}}$$

7. $$MJ = \sqrt{C_2 - C_{1}^{2}}$$

The second method, based on the kernel density, is computed for a variable X and the desired quantile q as follows:

1. Let $$h = \frac{1.2(\hat{X}_{0.75} - \hat{X}_{0.25})} {n^{1/5}}$$ where $$\hat{X}$$ is the estimated quantile.

2. Compute the number of observations of X contained in the interval X +/- h. Call this NINT.

3. $$\hat{f}(x) = \frac{NINT}{2nh}$$

4. The standard error of $$\hat{X}_q = \frac{1}{2\sqrt{n}\hat{f}(\hat{X}_q)}$$
Syntax:
LET <par> = <quant> QUANTILE STANDARD ERROR <y>
<SUBSET/EXCEPT/FOR qualification>
where <y> is the response variable;
<qaunt> is a number or parameter in the range (0,1) that specifies the desired quantile;
<par> is a parameter where the computed quantile standard error is stored;
and where the <SUBSET/EXCEPT/FOR qualification> is optional.
Examples:
SET QUANTILE STANDARD ERROR MARITZ-JARRETT
LET A = 0.20 QUANTILE STANDARD ERROR Y

SET QUANTILE STANDARD ERROR KERNEL DENSITY
LET XQ = 0.20
LET A = XQ QUANTILE STANDARD ERROR Y

SET QUANTILE STANDARD ERROR KERNEL DENSITY
LET XQ = 0.20
LET A = XQ QUANTILE STANDARD ERROR Y SUBSET TAG > 1

Note:
The following command is used to determine which method is used to compute the quantile standard error:

SET QUANTILE STANDARD ERROR <KERNEL DENSITY/MARITZ JARRETT>
Note:
Dataplot statistics can be used in 20+ commands. For details, enter

The specific quantile to compute is specified by entering the following command (before the plot command):

LET XQ = <value>

where <value> is a number in the interval (0,1) that specifies the desired quantile.

Note:
To obtain standard errors and confidence limits for the Herrell-Davis method, use the BOOTSTRAP PLOT command. For example,

LET XQ = 0.95
SET QUANTILE METHOD HERRELL DAVIS
BOOTSTRAP SAMPLES 500
BOOTSTRAP QUANTILE STANDARD ERROR PLOT Y
LET LCL = B025
LET UCL = B975

The bootstrap method can also be applied to quantile estimated using the order statistic method.

Default:
The default is to use the Maritz-Jarrett method to compute the quantile standard error.
Synonyms:
None
Related Commands:
 QUANTILE = Compute a quantile of a variable. MEDIAN = Compute the median of a variable. LOWER QUARTILE = Compute the lower quartile of a variable. UPPER QUARTILE = Compute the upper quartile of a variable. FIRST DECILE = Compute the first decile (the 10th quantile) of a variable. STATISTIC PLOT = Generate a statistic versus subset plot for a given statistics. BOOTSTRAP PLOT = Generate a bootstrap plot for a given statistic.
Reference:
Rand Wilcox (1997), "Introduction to Robust Estimation and Hypothesis Testing", Academic Press.

Frank Herrell and C. E. Davis, (1982), "A New Distribution-Free Quantile Estimator", Biometrika, 69(3), 635-640.

Hyndman and Fan (November 1996), "Sample Quantiles in Statistical Packages", The American Statistician, Vol. 50, No. 4, pp. 361-365.

Applications:
Data Analysis
Implementation Date:
2002/07
Program:
LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 100
LET XQ = 0.05
LET P05 = XQ QUANTILE Y1
LET P05SE = XQ QUANTILE STANDARD ERROR Y1


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

Date created: 07/22/2002
Last updated: 10/07/2016