QUARTILE (matrix);
The QUARTILE function is part of the IMLMLIB library . Given an data matrix, the QUARTILE function returns a matrix. The rows of the return matrix contain the minimum, lower quartile, median, upper quartile, and maximum values (respectively) for the data in matrix. Missing values are excluded from the computation. If all values in a column are missing, the return values for that column are missing.
use sashelp.class; read all var _NUM_ into X[colname=varNames]; close sashelp.class; q = quartile(X); rn = {"Minimum" "Q1" "Median" "Q2" "Maximum"}; print q[rowname=rn colname=varNames];
Figure 25.297: Quartiles
For the computation of arbitrary quantiles, see the documentation for the QNTL call .