agop - Online Manual

pord_spread {agop}R Documentation

Compare Spreads of Vectors (Preorder)


These functions determine whether one numeric vector has not greater spread than the other


pord_spread(x, y)

pord_spreadsym(x, y)



numeric vector


numeric vector of the same length as x


These functions accept only vectors of the same size. [TO DO: should not it return FALSE or NA in this case?]

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 dispersion functions (see Gagolewski, 2013) and is implemented in pord_spread,

Moreover, pord_spreadsym implements the relation corresponding to symmetrized dispersion functions, i.e. which acts on sorted vectors.

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 (MAD).


Both functions return a single logical value, which states whether x has no greater spread than y


Gagolewski M., Dispersion Functions: Aggregation Operators that Measure Variability, Spread, or Scatter of Numeric Sequences, submitted paper, 2013.

Gagolewski M., Symmetric Dispersion Functions, in preparation, 2013.

See Also

Other binary_relations: check_comonotonicity; pord_weakdom; rel_closure_reflexive, rel_is_reflexive, rel_reduction_reflexive; rel_closure_symmetric, rel_is_symmetric; rel_closure_total_fair, rel_is_total; rel_closure_transitive, rel_is_transitive, rel_reduction_hasse, rel_reduction_transitive; rel_graph; rel_is_antisymmetric; rel_is_asymmetric; rel_is_cyclic; rel_is_irreflexive

Other dispersion_functions: d2owa, d2owa_checkwts

[Package agop version 0.2-0 Index]