a nondecreasing function ranging on [0,1], $\gamma$ (see Details), the inverse of a so-called control function.
sorted.dec
logical; TRUE if the vector has already been sorted non-increasingly; defaults FALSE.
disable.check
logical; TRUE to disable some validity checks on the input vector; defaults FALSE.
Value
The function returns a single number or NA if improper input has been given.
Details
Given a sequence of $n$ non-negative numbers $x=(x_1,\dots,x_n)$,
where $x_i\ge x_j$ for $i\le j$,
and a nondecreasing function $\gamma: R\to[0,1]$,
the S-statistic2 (Gagolewski, Grzegorzewski, 2010) for $x$ is defined as
$$V_n(x)=\max_{i=1,\dots,n}{\min{\gamma(x_i), i/n }}$$
If disable.check is set to FALSE, then
eventual NA values are removed from the input vector.
If a non-increasingly sorted vector is given as input (set sorted.dec to TRUE)
the result is computed in linear time.
References
Gagolewski M., Grzegorzewski P., S-Statistics and Their Basic Properties,
In: Borgelt C. et al (Eds.), Combining Soft Computing and Statistical Methods in Data Analysis, (SMPS 2010), Springer-Verlag, 2010, 281-288.