CITAN (version 2011.03-1)

Sstat2: S-statistic2

Description

Computes the S-statistic2 w.r.t. to the identity function for data transformed by the inverse of a control function.

Usage

Sstat2(x, kappaInv, sorted.dec=FALSE, disable.check=FALSE)

Arguments

x
a vector of real numbers.
kappaInv
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.

See Also

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

Examples

Run this code
x <- rpareto2(25, 1.05, 1);
kappaInv <- function(x) { pmax(0,pmin(1,x/25)); }
Sstat2(x, kappaInv, FALSE, TRUE);

Run the code above in your browser using DataCamp Workspace