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 2 Auxiliary Chapter

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 to 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 = 1.2*(Xhat(0.75) - Xhat(0.25))/n**(1/5) where Xhat is the estimated quantile.

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

    3. fhat(x) = NINT/(2*n*h)

    4. The standard error of Xhat(q) = 1/[2*SQRT(n)*fhat(Xhat(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:
    Support for the quantile standard error has been added to the following plots:

      QUANTILE STANDARD ERROR PLOT
      CROSS TABULATE QUANTILE STANDARD ERROR PLOT
      BOOTSTRAP QUANTILE STANDARD ERROR PLOT
      JACKNIFE QUANTILE STANDARD ERROR PLOT
      DEX QUANTILE STANDARD ERROR PLOT
      QUANTILE STANDARD ERROR INFLUENCE CURVE
      INTERACTION QUANTILE STANDARD ERROR PLOT

    The specific quantile for which the standard error is to be computed is specified by entering the following command (before the plot command):

      LET XQ = <value>

    where 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 statistic.
    CROSS TABULATE PLOT = Generate a statistic versus subset plot (two group variables) for a given statistics.
    BOOTSTRAP PLOT = Generate a bootstrap plot for a given statistic.
    INFLUENCE CURVE = Generate an influence curve for a given statistic.
    DEX PLOT = Generate a dex plot for a given statistic.
    INTERACTION STATISTIC PLOT = Generate an interaction plot for a given statistic.
Reference:
    "Introduction to Robust Estimation and Hypothesis Testing", Rand Wilcox, Academic Press, 1997.
Applications:
    Data Analysis
Implementation Date:
    2002/7
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 
        

Date created: 7/22/2002
Last updated: 4/4/2003
Please email comments on this WWW page to alan.heckert@nist.gov.