Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
BOXCHART Statement

Percentile Definitions

You can use the PCTLDEF= option to specify one of five definitions for computing quantile statistics (percentiles). Let n equal the number of nonmissing values for a variable, and let x1, x2, ... ,xn represent the ordered values of the process variable. For the t th percentile, set p =t/100, and express np as
np = j + g
where j is the integer part of np, and g is the fractional part of np.

The t th percentile (call it y) can be defined in five ways, as described in the next five sections.

PCTLDEF=1

This uses the weighted average at xnp
y = (1- g)xj + gxj+1
where x0 is taken to be x1.

PCTLDEF=2

This uses the observation numbered closest to np
y=xi
where i is the integer part of np + 1/2.

PCTLDEF=3

This uses the empirical distribution function
y=x_{j} & {if } \, g=0 \y=x_{j+1} & {if } \, g \gt 0 \

PCTLDEF=4

This uses the weighted average aimed at xp(n+1)
y=(1-g)xj + gxj+1
where (n+1)p=j+g, and where xn+1 is taken to be xn.

PCTLDEF=5

This uses the empirical distribution function with averaging
y=(x_{j} + x_{j+1})/2 & {if } \, g = 0 \y=x_{j+1} & {if } \, g \gt 0 \

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.