Quantiles of a data set (inverse of cumulative distribution function)
y = CL_quantile(x, p [[, orient]])
Evaluates quantiles of a data set.
Let F be the empirical cumulative distribution function associated with the data set x. The quantity (y) that is computed is such that:
F(y) = p (p: probability in [0,1]).
The method used to calculate sample quantiles is the same as in the R-project (method number 5):
For a data set containing N elements, quantiles are computed as follows:
1) The sorted values in x are considered as the (0.5/N), (1.5/N), ..., ((N-0.5)/N) quantiles.
2) Linear interpolation is used to compute quantiles for probabilities between (0.5/N) and ((N-0.5)/N)
3) The minimum or maximum values in x are assigned to quantiles for probabilities outside that range.
Note: This method is used in Matlab's quantile function as well.
Matrices are handled depending on the orient argument: the quantiles can be computed globally ("m"), column-wise ("c") or row-wise ("r").
Data set (MxN)
Probabilities (1xP)
(string, optional) Quantile direction: "m", "c", or "r". Default is "m". (1x1)
Quantiles: (1xP) if orient = "m", (MxP) if orient = "c", (PxN) if orient = "r".
CNES - DCT/SB
1) R: A Language and Environment for Statistical Computing; http://cran.r-project.org/doc/manuals/fullrefman.pdf.