View on GitHub

quantile

Agnostic (re)implementations (R/SAS/Python/C) of common quantile estimation algorithms.

Syntax

quantile: Compute empirical quantiles of a variable with sample data corresponding to given probabilities.


Common parameterisation

Some arguments are common to the implementations in the different languages:


SAS macro
%quantile(var, probs=, type=7, method=DIRECT, names=, _quantiles_=, 
	  idsn=, odsn=, ilib=WORK, olib=WORK, na_rm = YES);

Arguments

Returns Return estimates of underlying distribution quantiles based on one or two order statistics from the supplied elements in var at probabilities in probs, following quantile estimation algorithm defined by type. The output sample quantile are stored either in a list or as a table, through:

Notes

type 1234567891011
PCTLDEF 3521 n.a.4 n.a. n.a. n.a. n.a. n.a.

Python method
>>> q = quantile(x, probs, na_rm = False, type = 7, 
	  method='DIRECT', limit=(0,1))

Arguments

Returns

Notes


R method
> q <- quantile(x, data = NULL, probs=seq(0, 1, 0.25), na.rm=FALSE, 
	  type=7, method="DIRECT", names= FALSE)

Arguments

Notes

Returns


See also