R port of morie.semipar_bridge. Provides the kernel-based
building blocks used by morie's nuisance estimation pipelines
(TMLE, AIPW, DML): kernel evaluation, Nadaraya-Watson regression,
local linear regression, kernel density estimation, and bandwidth
selection.
Details
The Python module loads a C shared library (semipar_kernels.dylib
/ .so) and falls back to NumPy. The R port is pure R: it
implements the same algorithms in vectorised form and additionally
wraps mgcv::gam for a high-quality penalised-spline smoother
as an alternative to manual bandwidth selection.
Functions
kernel_eval: evaluate a kernel function.nw_regression: Nadaraya-Watson kernel regression.local_linear: local linear kernel regression.kde: kernel density estimation.silverman_bandwidth: rule-of-thumb bandwidth.loocv_bandwidth: leave-one-out CV bandwidth for NW regression.kernel_cond_moments: kernel-weighted mean and variance.gam_smoother:mgcv::gamthin-plate smoother fit + predict.SemiparKernels: object-style wrapper.