dot-ks_statistic: Two-sample Kolmogorov-Smirnov statistic of weighted samples

.ks_statisticR Documentation

Two-sample Kolmogorov-Smirnov statistic of weighted samples

Description

The largest absolute difference between the two weighted empirical distribution functions, evaluated at every observed value. Tied values are summed into one step, so ties need no special treatment; with unit weights this is the statistic of stats::ks.test(). Balance is described by the statistic alone, without a p-value.

Usage

.ks_statistic(x, y, wx = rep(1, length(x)), wy = rep(1, length(y)))

Value

The statistic, or NA when either sample is empty.


couplr documentation built on Nov. 26, 2026, 9:07 a.m.