|
VECTOR PERCENTILEName:
The p-th percentile of a data set is defined as that value where p percent of the data is below that value and (1-p) percent of the data is above that value. For example, the 50th percentile is the median. The default method for computing percentiles in Dataplot is based on the order statistic. The formula is:
where
If p is < 1/(n+1), then X1 is returned. If p > n/(n+1), then XN is returned. The above is for a single percentile. For the VECTOR PERCENTILE command, you specify the number of percentiles that you would like to compute. Dataplot will then generate the appropriate values for p in the above formulas.
<SUBSET/EXCEPT/FOR qualification> where <x> is the response variable; <nperc> is a number or parameter that specifies the number of percentiles to generate; <y> is a variable where the computed percentiles are stored; and where the <SUBSET/EXCEPT/FOR qualification> is optional.
LET Y = VECTOR PERCENTILE X 10000 LET Y = VECTOR PERCENTILE X NPERC LET Y = VECTOR PERCENTILE X NPERC SUBSET X > 0
The default method used by Dataplot described above is equivalent to method R6 of Hyndman and Fan. The description of the methods here will be in terms of the quantile q = p/100 where p is the desired percentile. The method advocated by Hyndman and Fan is R8. For the R8 method,
where
If q ≤ (2/3)/(n+(1/3)) the minimum value will be returned and if q ≥ (n-(1/3))/(n+(1/3)) the maximum value will be returned. Method R7 (this is the default method in R and Excel) is calculated by
where
If q = 1, then Xn is returned. The R6, R7, and R8 methods give fairly similar, but not exactly the same (particularly for small samples), results. For most purposes, any of these three methods should be acceptable.
R6 is equivalent to ORDER. ORDER is the default.
. Step 1: Generate the raw data . let y = normal rand numb for i = 1 1 1000000 . . Step 2: Compute the desired percentiles . let nperc = 1000 let yperc = vector percentiles y nperc . . Step 3: Plot the percentiles . character circle character hw 1 0.75 character fill on line blank title Plot of 1,000 Percentiles Based on 1,000,000 Points y1label Percentile Value . plot yperc
|
Privacy
Policy/Security Notice
NIST is an agency of the U.S.
Commerce Department.
Date created: 07/06/2016 |