CITAN (version 2011.03-2)

Sstat: S-statistic

Description

Computes the S-statistic w.r.t. to a control function.

Usage

Sstat(x, kappa, sorted.dec=FALSE, disable.check=FALSE)

Arguments

x
a vector of real numbers.
kappa
an increasing function, $\kappa$ (see Details), 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 an increasing function $\kappa: [0,1]\to[a,b]$ for some $a,b$, the S-statistic (Gagolewski, Grzegorzewski, 2010) w.r.t. $\kappa$ for $x$ is defined as $$V_n(x)=\max_{i=1,\dots,n}{\min{x_i, \kappa(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.

See Also

index.h, index.g, index.rp, index.lp, Sstat2, psstat, dsstat

Examples

Run this code
x <- rpareto2(25, 1.05, 1);
kappa <- function(x) { pmax(0,pmin(1,x))*25; }
Sstat(x, kappa, FALSE, TRUE);

Run the code above in your browser using DataLab