The p-value is the asymptotic one; it is unreliable for very small
samples and for heavily tied data, and ties is returned so a
caller can see whether that applies.
Details
Formula: D = sup_x |F1(x) - F2(x)|; t = sqrt(n1 n2/(n1 + n2)) D; p = 1 - H(t) = 2 sum_{j>=1} (-1)^{j-1} exp(-2 j^2 t^2)
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Kstest1(V, V)
#> $statistic
#> [1] 0
#>
#> $scaled
#> [1] 0
#>
#> $p_value
#> [1] 1
#>
#> $n1
#> [1] 8
#>
#> $n2
#> [1] 8
#>
#> $ties
#> [1] 8
#>
#> $method
#> [1] "Two-sample KS test, Wasserman Theorem 15.12"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
