Skip to contents

The value of rank r (ties broken by position) among n becomes the type-7 sample quantile of target at probability (r - 1)/(n - 1); with as many targets as values this is the sorted target in the rank order of the values (Journel and Deutsch 1993).

Usage

HistogramTransform(values, target)

Arguments

values

Numeric vector.

target

Sample of the target distribution.

Value

List with transformed and ranks.

References

Journel, A. G. and Deutsch, C. V. (1993). Entropy and spatial disorder. Mathematical Geology 25, 329-355.

Examples

HistogramTransform(c(.3, -1.2, .8, .1), c(10, 40, 20, 30))$transformed
#> [1] 30 10 40 20