The estimate is only as good as the importance weights, whose variance is finite only when the tail shape is below one half. k is not a fit statistic: it says whether the computation is entitled to a central limit theorem. Past 0.7 the required sample size grows so fast that the fold should be refitted exactly.
Details
Formula: generalised Pareto fitted to the largest
M = min(0.2 S, 3 sqrt(S)) weights by the Zhang-Stephens rule;
k is its shape.
References
Vehtari, Simpson, Gelman, Yao & Gabry (2024) JMLR 25:1-58; Zhang & Stephens (2009) Technometrics 51:316-325.
Examples
V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Khatd(V)
#> $estimate
#> [1] NaN
#>
#> $k
#> [1] NaN
#>
#> $n_bad
#> [1] 0
#>
#> $n_ok
#> [1] 1
#>
#> $S
#> [1] 8
#>
#> $n
#> [1] 1
#>
#> $method
#> [1] "Pareto k importance-weight diagnostic"
#>
#> attr(,"class")
#> [1] "morie_rich_result" "list"
