Description Usage Arguments Details Value References See Also
View source: R/check-comonotonicity.R
This functions determines if two vectors have a common ordering permutation.
1 | check_comonotonicity(x, y, incompatible_lengths = NA)
|
x |
numeric vector |
y |
numeric vector |
incompatible_lengths |
single logical value,
value to return iff lengths of |
Two vectors x
, y
of equal length n are comonotonic,
if and only if there exists a permutation σ such that
x_{σ(1)}≤ … ≤ x_{σ(n)} and
y_{σ(1)}≤ … ≤ y_{σ(n)}.
Thus, σ orders x
and y
simultaneously.
Equivalently, x
and y
are comonotonic,
iff (x_i-x_j)(y_i-y_j)≥ 0 for every i,j
.
If there are missing values in x
or y
, the function
returns NA
.
Currently, the implemented algorithm has O(n^2) time complexity.
Returns a single logical value.
Grabisch M., Marichal J.-L., Mesiar R., Pap E., Aggregation functions, Cambridge University Press, 2009.
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
Other binary_relations: pord_nd
,
pord_spread
, pord_weakdom
,
rel_graph
,
rel_is_antisymmetric
,
rel_is_asymmetric
,
rel_is_cyclic
,
rel_is_irreflexive
,
rel_is_reflexive
,
rel_is_symmetric
,
rel_is_total
,
rel_is_transitive
,
rel_reduction_hasse
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.