PING
0.9
Statistical data handling and processing in production environment
|
Compute empirical quantiles of sample data (e.g. survey data) corresponding to selected probabilities. Include the 9 methods described by (Hyndman and Fan, 1996) + the one by (Cunnane, 1978) + the one by (Filiben, 1975).
Arguments
x
: a numeric vector or a value (character or integer) providing with the sample data; when data
is not null, x
provides with the name (char
) or the position (int) of the variable of interest in the table;data : (_option_) input table, defined as a dataframe, whose column defined by
x is used as sample data for the estimation; if passed, then
xshould be defined as a character or an integer; default:
data=NULLand input sample data should be passed as numeric vector in
x; *
probs : (option) numeric vector giving the probabilities with values in [0,1]; default: probs=seq(0, 1, 0.25)
like in original stats::quantile
function;na.rm, names : (_option_) logical flags; if
na.rm=TRUE, any NA and NaN's are removed from
xbefore the quantiles are computed; if
names=TRUE`, the result has a names attribute; these two flags follow exactly the original implementation of stats::quantile
; default: na.rm= FALSE
and names= FALSE
;Python scipy
library; see the references for more details;"INHERIT"
so that the function uses the original stats::quantile
function already implemented in R
; this is incompatible with type>9
,"DIRECT"
for a canonical implementation based on the direct transcription of the various quantile estimation algorithms;default: method="DIRECT"
.
Returns q
: a vector containing the quantile values.