gkrr_vcov() computes the sandwich covariance matrix
with any member of the GKRReg-HC family of finite-sample corrections
(HC0 to HC4). The weighted leverage can be
taken from the bread matrix (leverage = "bread", the
quantity delivered by the leave-one-out expansion) or from the
kernel-weighted hat matrix (leverage = "kernel", always in
[0, 1]), and HC1/HC4 can be
calibrated by the effective sample size sum(k_ii)
(neff = "sum") or by Kish’s effective sample size
(neff = "kish").vcov() gains a type argument dispatching
to gkrr_vcov(). The default type = "HC0"
reproduces the previous behaviour.gkrr_vcov_all() returns standard errors for every
variant at once, together with diagnostics (both effective sample sizes,
the number of observations with a negative bread weight, and the range
of both leverages). Intended for simulation studies.gkrr_jackknife() refits the model with each observation
deleted in turn and compares the exact leave-one-out residual with the
one-step approximation used by HC3 and
HC4.gkrr() and sigma2_s1() gain a
seed argument. sigma_method = "s1" draws a
random sub-sample and was previously not reproducible:
repeated calls on the same data returned different estimates of
gamma^2 and hence different coefficients. The caller’s
random number stream is left unchanged.kernel_update, gkrr_vcov_all() and the
jackknife check, followed by a three-way comparison of HC0, the
corrections and the bootstrap.introduction
to gkrreg, so that vignette("gkrreg") is
unambiguous (vignette("introduction") collided with
vignettes of the same name in other packages).summary() method for "gkrr_boot"
objects now labels the printed quantiles of the bootstrap
distribution.Authors@R now uses a Unicode escape, keeping
DESCRIPTION pure ASCII, so the accented character survives documentation
generation.sigma_method = "s4": new width hyper-parameter
estimator based on the AICc-selected bandwidth from
sm::h.select() (squared to obtain a variance-scale estimate
of gamma^2). Recommended for large samples
(n >= 200). Requires the sm package
(now in Imports).
sigma_method = "auto": automatic selection among S1,
S2, S3 and S4 by out-of-bag bootstrap MSE. The number of replicates and
seed are configurable via the new auto_args argument (e.g.,
auto_args = list(B = 99, seed = 1)). A
message() is emitted informing the user of the selected
method and comparative OOB MSEs.
New auto_args argument in gkrr() for
controlling the "auto" selection bootstrap (default
B = 99).
weighted argument has been removed from
gkrr_boot(). The weighted bootstrap was found to produce
wider confidence intervals than the standard pairs bootstrap in all
tested scenarios, because the robustness of GKRReg already resides in
the kernel weights — the bootstrap itself does not need to replicate
this. The standard pairs bootstrap is the recommended and only available
option.Imports (previously not a
dependency).summary() for inference (standard
errors, confidence intervals and Wald z-tests) when no bootstrap object
is available.vcov() method added, returning the sandwich covariance
matrix.summary() gains a se_tol argument
controlling the threshold for divergence warnings between sandwich and
bootstrap standard errors.summary() emits a proactive note suggesting bootstrap
inference when small sample size (n < 50) or heavy
contamination is detected.par() settings are now properly restored in all plot
methods and vignette chunks using
oldpar <- par(no.readonly = TRUE) /
on.exit(par(oldpar)).First public release.
gkrr() fits a Gaussian Kernel Robust Regression model
via IRWLS. Three estimators for the kernel width hyper-parameter:
"s1" (Caputo), "s2" (pairwise median) and
"s3" (residual variance).gkrr_boot() runs a pairs bootstrap to produce standard
errors, confidence intervals (percentile, normal, BCa) and
p-values.boot argument in gkrr(): set
boot = TRUE to compute bootstrap inference at fit
time.summary.gkrr() prints a coefficient table modelled
after summary.lm().plot.gkrr() provides six diagnostic panels where point
size is inversely proportional to the kernel weight.plot.gkrr_boot() provides histogram and scatter-plot
matrix panels.belgium_calls,
cloud_point, kootenay, delivery,
mammals, stars_cyg.