You can use the PCTLDEF=
option to specify one of five definitions for computing quantile statistics (percentiles). Suppose that n is the number of nonmissing values for a variable and that
represent the ordered values of the analysis variable. For the tth percentile, set
.
For the following definitions numbered 1, 2, 3, and 5, express
as
![\[ np = j + g \]](images/statug_boxplot0018.png)
where j is the integer part of
, and g is the fractional part of
. For definition 4, let
![\[ (n+1)p=j+g \]](images/statug_boxplot0019.png)
The tth percentile (call it y) can be defined as follows:
weighted average at
![\[ y = (1 - g)x_ j + gx_{j+1} \]](images/statug_boxplot0021.png)
where
is taken to be
.
observation numbered closest to
![\[ y = x_ i \]](images/statug_boxplot0024.png)
where i is the integer part of
if
. If
, then
if j is even, or
if j is odd.
empirical distribution function
![\[ y = x_ j ~ \mbox{if}~ g = 0 \]](images/statug_boxplot0030.png)
![\[ y=x_{j+1}~ \mbox{if}~ g > 0 \]](images/statug_boxplot0031.png)
weighted average aimed at
![\[ y=(1 - g)x_ j + gx_{j+1} \]](images/statug_boxplot0033.png)
where
is taken to be
.
empirical distribution function with averaging
![\[ y = (x_ j + x_{j+1})/2 ~ \mbox{if}~ g = 0 \]](images/statug_boxplot0036.png)
![\[ y = x_{j+1}~ \mbox{if}~ g > 0 \]](images/statug_boxplot0037.png)