Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

pord_spread

Compare Spread of Vectors (Preorder)


Description

This function determines whether one numeric vector has not greater spread than the other

Usage

pord_spread(x, y, incompatible_lengths = NA)

Arguments

x

numeric vector

y

numeric vector of the same length as x

incompatible_lengths

single logical value, value to return iff lengths of x and y differ

Details

We say that x of size n is of no greater spread than y iff for all i,j=1,…,n such that x_i>x_j it holds x_i-x_j≤ y_i-y_jll . Such a preorder is used in the definition of a spread measure (see Gagolewski, 2015).

Note that the class of dispersion functions includes e.g. the sample variance (see var), standard veriation (see sd), range (see range and then diff), interquartile range (see IQR), median absolute deviation (see mad).

Value

The function returns a single logical value, which states whether x has no greater spread than y

References

Gagolewski M., Spread measures and their relation to aggregation functions, European Journal of Operational Research 241(2), 2015, pp. 469–477.

Gagolewski M., Data Fusion: Theory, Methods, and Applications, Institute of Computer Science, Polish Academy of Sciences, 2015, 290 pp. isbn:978-83-63159-20-7

See Also


agop

Aggregation Operators and Preordered Sets

v0.2-3
LGPL (>= 3)
Authors
Marek Gagolewski [aut, cre] (<https://orcid.org/0000-0003-0637-6028>), Anna Cena [ctb] (<https://orcid.org/0000-0001-8697-5383>)
Initial release
2020-01-06

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.