Jackknife for Hájek-dominated generalized U-statistics (overview)
Source:vignettes/jackknife-gen-ustats.Rmd
jackknife-gen-ustats.RmdOverview
RdistNN includes two delete-1 jackknife utilities for
rank-weighted functionals:
-
jackknife_fast_rank(): optimized implementation (compiled when available) -
jackknife_slow_rank(): reference implementation for validation
Both return:
-
theta0: baseline aggregate -
theta_loo: all leave-one-out aggregates -
info: metadata (s, number of targets, output dimension, normalization)
Important distinction:
-
jackknife_fast_rank()andjackknife_slow_rank()are generic utilities for compact-support rank-weighted L-stat rules; - the user-level exact DNN wrappers do not truncate
to the first
sobservations. They keep the full rank matrix and reevaluate the DNN rank-weight rule after delete-one updates.
Example Setup
n <- 40
p <- 2
s <- 3L
X <- matrix(rnorm(n * p), n, p)
Y <- rnorm(n)
# Toy compact-support example: build only the first s+1 ranked observations
# for each target point. This illustrates the generic L-stat utilities below;
# it is not the internal exact-DNN jackknife path used by np_dnn()/cate_dnn()/plqr_dnn().
wt <- weights_dnn(
X = X, X0 = X,
method = "exact",
distance = "l2",
k = s, s = s,
return = "ord"
)
ranks <- t(wt$ord[seq_len(s + 1L), , drop = FALSE]) # T x (s+1)
# L-stat coefficients
a <- rep(1, s)
# Scalar signal represented as n x 1 matrix
phi <- cbind(Y)Fast vs Slow Jackknife
jk_fast <- jackknife_fast_rank(ranks = ranks, a = a, phi = phi, normalize = TRUE)
jk_slow <- jackknife_slow_rank(ranks = ranks, a = a, phi = phi, normalize = TRUE)
all.equal(jk_fast$theta0, jk_slow$theta0, tolerance = 1e-12)
all.equal(jk_fast$theta_loo, jk_slow$theta_loo, tolerance = 1e-12)Notes
-
jackknife_fast_rank()supports both matrixphiand function-valuedphi(j, t). - The slow version is useful for debugging and parity checks in tests.
- For user-level wrappers (
np_dnn(),cate_dnn(),plqr_dnn()), these steps are handled internally whense = TRUE.
Related Articles
-
Notation and package
conventions:
vignette("notation-and-conventions", package = "RdistNN")distinguishes DNN kernel order, localized moments, and the uncertainty fields returned by user-level estimators. -
DNN weights:
vignette("dnn-weights", package = "RdistNN")describes the exact rank weights used by the jackknife path. -
Conditional
Z-estimation:
vignette("conditional-z-estimation", package = "RdistNN")shows the high-level wrappers that invoke these routines internally.