SED navigation bar go to SED home page go to Dataplot home page go to NIST home page SED Home Page SED Staff SED Projects SED Products and Publications Search SED Pages
Dataplot Vol 2 Vol 1

LP LOCATION

Name:
    LP LOCATION (LET)
Type:
    Let Subcommand
Purpose:
    Compute the Lp (least power) location estimate of a variable.
Description:
    This description is summarized from the more thorough discussion given in the Pennecchi and Callegaro paper (see the Reference section below).

    The univariate measurement model (or location model) is

      \( y_i = \alpha + e_i \)

    where \( \alpha \) is the unknown value to be estimated and the yi are the sample observations affected by the measurement errors ei.

    The least power (Lp) provides a broad class of location estimators. This class includes the mean, the median, and the mid-range as special cases.

    The Lp norm (for p >= 1) is defined as

      \( ||x||_p = \left( \sum_{i=1}^{n}{|x_i|^p} \right) ^{(1/p)} \)

    For p = 1, 2, and \( \infty \), these become the following norms

      \( ||x||_p = \left( \sum_{i=1}^{n}{|x_i|^p} \right) ^{(1/p)} \)
      \( ||x||_2 = \sqrt{\sum_{i=1}^{n}{x_i^{2}}} \)
      \( ||x||_1 = \sum_{i=1}^{n}{|x_i|} \)

    The Lp norm estimation is based on the minimization of the Lp norm of a suitable residual vector. Specifically, the Lp estimator of \( \alpha \) is

      \( \left\{ L_{p}(x_i) = \arg_{\alpha} \min \left( \sum_{i=1}^{n}{|x_i - \alpha|^p} \right) ^{1/p} \right\} \)

    where arg min means the argument of the minimum. That is, the value of \( \alpha \) that results in the minimum value of the expression.

    The Lp estimate is the solution of the equation

      \( \sum_{i=1}^{n}{|x_i - \alpha|^{p-1}\mbox{sign}(x_i - \alpha)} = 0 \)

    The special cases mentioned above correspond to

      p = 1 - sample median
      p = 2 - sample mean
      p = \( \infty \) - sample mid-range

    Values of p between 1 and 2 are of most interest as these have efficiency and robustness properties between the median (p = 1) and the mean (p = 2).

    The Pennecchi and Callegaro paper provides the following guidelines for choosing a suitable value for p. Compute the sample kurtosis, \( \hat{k} \), of the sample observations (note that the standard kurtosis formula should be used, not the version that subtracts 3 to make the kurtosis of a normal distribution equal to 0). Then

      \( \hat{k} \) < 2.2 - use the mid-range (i.e., p = \( \infty \) )
      2.2 ≤ \( \hat{k} \) ≤ 3 - use the mean (i.e., p = 2)
      3 < \( \hat{k} \) < 6 - use p = 1.5
      \( \hat{k} \) ≥ 6 - use the median (i.e., p = 1)

    Pennecchi and Callegaro propose the following as an estimate of the asymptotic variance

      \( \frac{m(2p - 2)}{\left( (p-1)m(p-2)\right) ^{2}}/n \)

    where

      \( m(r) = \frac{1}{n} \sum_{i=1}^{n}{|x_i - L_p(x_i)|^r} \)
Syntax 1:
    LET <par> = LP LOCATION <y>
                            <SUBSET/EXCEPT/FOR qualification>
    where <y> is the response variable;
                <par> is a parameter where the computed lp location value is saved;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    Use this syntax to compute the Lp location estimate.

Syntax 2:
    LET <par> = VARIANCE OF LP LOCATION <y>
                            <SUBSET/EXCEPT/FOR qualification>
    where <y> is the response variable;
                <par> is a parameter where the computed variance of the lp location value is saved;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    Use this syntax to compute the variance of the Lp location estimate.

Syntax 3:
    LET <par> = SD OF LP LOCATION <y>
                            <SUBSET/EXCEPT/FOR qualification>
    where <y> is the response variable;
                <par> is a parameter where the computed sd of the lp location value is saved;
    and where the <SUBSET/EXCEPT/FOR qualification> is optional.

    Use this syntax to compute the standard deviation of the Lp location estimate.

Examples:
    LET P = 1.5
    LET ALOC = LP LOCATION Y
    LET AVAR = LP VARIANCE Y
    LET ASD = LP SD Y
    LET ALOC = LP LOCATION Y SUBSET Y > 0
Note:
    Specify the value of p (before using the LP LOCATION or LP VARIANCE commands) by entering the following command

      LET P = <value>
Note:
    Dataplot statistics can be used in a number of commands. For details, enter

Default:
    None
Synonyms:
    STANDARD DEVIATION OF LP LOCATION is a synonym for SD OF LP LOCATION
    SD LP LOCATION is a synonym for SD OF LP LOCATION
    VARIANCE LP LOCATION is a synonym for VARIANCE OF LP LOCATION
Related Commands:
    MEAN = Compute the mean of a variable.
    MEDIAN = Compute the median of a variable.
    MIDRANGE = Compute the midrange of a variable.
    H15 LOCATION = Compute the H15 estimate of location.
    VARIANCE = Compute the variance of a variable.
    STANDARD DEVIATION = Compute the standard deviation of a variable.
    MAD = Compute the median absolute deviation of a variable.
Applications:
    Data Analysis, Key Comparisons
Reference:
    Francesca Pennecchi and Luca Callegaro (2006), "Between the Mean and the Median: the Lp Estimator," Metrologia, 43, pp. 213-219.
Implementation Date:
    2007/11
Program:
     
    LET Y1 = NORMAL RANDOM NUMBERS FOR I = 1 1 50
    LET Y2 = LAPLACE RANDOM NUMBERS FOR I = 1 1 50
    LET Y3 = UNIFORM RANDOM NUMBERS FOR I = 1 1 50
    LET Y4 = SLASH RANDOM NUMBERS FOR I = 1 1 50
    LET Y X = STACKED Y1 Y2 Y3 Y4
    .
    MULTIPLOT SCALE FACTOR 2
    MULTIPLOT CORNER COORDINATES 5 5 95 95
    LABEL CASE ASIS
    TIC MARK LABEL CASE ASIS
    TITLE CASE ASIS
    TITLE OFFSET 2
    Y1LABEL DISPLACEMENT 15
    XLIMITS 1 4
    MAJOR XTIC MARK NUMBER 4
    MINOR XTIC MARK NUMBER 0
    X1TIC MARK LABEL FORMAT ALPHA
    X1TIC MARK LABEL CONTENT Normal Laplace Uniform Slash
    TIC MARK OFFSET UNITS DATA
    X1TIC MARK OFFSET 0.5 0.5
    CHARACTER X BLANK
    LINE BLANK SOLID
    .
    MULTIPLOT 2 2
    LET P = 1
    Y1LABEL L(1) Location
    LP LOCATION PLOT Y X
    LET P = 1.5
    Y1LABEL L(1.5) Location
    LP LOCATION PLOT Y X
    LET P = 2
    Y1LABEL L(2) Location
    LP LOCATION PLOT Y X
    LET P = 100
    Y1LABEL L(100) Location
    LP LOCATION PLOT Y X
    END OF MULTIPLOT
    .
    SET WRITE DECIMALS 4
    SET LET CROSS TABULATE COLLAPSE
    LET P = 1.5
    LET XGROUP = CROSS TABULATE GROUP ONE X
    LET YMEAN = CROSS TABULATE LP LOCATION Y X
    LET YSD   = CROSS TABULATE SD OF LP LOCATION Y X
    PRINT XGROUP YMEAN YSD
        
    The following output is generated

    plot generated by sample program

    ---------------------------------------------
             XGROUP          YMEAN            YSD
    ---------------------------------------------
             1.0000        -0.0176         0.1124
             2.0000        -0.0066         0.2120
             3.0000         0.5542         0.0641
             4.0000        -3.1948         3.6755
        

Privacy Policy/Security Notice
Disclaimer | FOIA

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

Date created: 07/14/2011
Last updated: 10/07/2016

Please email comments on this WWW page to alan.heckert@nist.gov.