
Changelog
rbbnp 1.2.0
This release introduces a smaller, conventional public API and the reproducibility infrastructure for the JSS software paper.
Interface
- Added
bias_bound_density()andbias_bound_regression()as the two primary estimators. Both use lowercasex/y, a singlebwargument for fixed or automatically selected bandwidths,conf_level, a validatedkernelargument, and a namedcontrollist for advanced settings. - Retained
biasBound_density()andbiasBound_condExpectation()as deprecation shims. Formerly exported implementation helpers are now internal. - Made the Fourier-envelope grid resolution explicit as
control$envelope_points_per_loginstead of an undocumented literal. -
confint()now rejects a confidence level different from the fitted level instead of silently ignoring it. - Vector-valued
evalinputs now return one estimate, standard error, and interval per requested evaluation point for both primary estimators.
Data and diagnostics
- Replaced duplicate
sample_datafiles with the descriptively namedtwo_fold_uniform_exampledataset and matching Stata file. - Removed the unused
DATA_PATHandEXT_DATA_PATHnamespace objects. - Made the internal mixed simulation design a genuine random mixture.
Validation
Added a full benchmark against h/4 undersmoothing,
nprobust,np, andsmover four designs and three sample sizes. The results document the intended tradeoff: average pointwise coverage for the bias-bound intervals ranges from 0.991 to 1.000, with a smallest point-specific coverage of 0.945. They are generally wider, especially in regression, with one near-equal density comparison at the largest sample size.Corrected the FFT density cross-validation objective and added direct-versus- FFT agreement tests, including the Old Faithful density sample. The previous fast path could select a bandwidth far from the exact least-squares-CV minimizer; separate tests verify that regression CV responds to
y.Regression cross-validation now minimizes leave-one-out Nadaraya–Watson prediction error and therefore uses the response. Previously the automatic regression selector incorrectly reused density CV on the predictor alone.
smoothness_floor = TRUEnow enforces the full theoretical restrictionrin{2, 3, ...}with a mixed-integer envelope solve. The earlier continuous-slope behavior is available only as an explicit diagnostic extension and is not covered by Schennach’s 2020 theorem.Regression marginal and numerator Fourier windows are selected separately, matching the two applications of the theory. The exact Theorem 2 window now errors with guidance when its feasible set is empty instead of substituting an unselected upper cap.
Corrected regression standard errors to the conventional Nadaraya–Watson ratio scale and fixed stored
conf_levelmetadata to contain the fitted confidence level rather than the tail probability.Restored Lemma 3’s deliberately unbounded regression intervals when a bias-adjusted denominator reaches zero. This supersedes the 1.1.0 release note’s overbroad statement that regression bands were always finite.
Empty
control = list()values now correctly request all documented defaults.Restored the standard
tests/testthat.Rrunner so source-package checks execute the complete test suite.Stabilized the Epanechnikov Fourier transform at and near zero using its Taylor expansion; the former closed-form evaluation returned
NaNat zero and suffered catastrophic cancellation nearby.Exposed the envelope solver’s former fixed upper exponent 50 as
control$smoothness_maxand made the LP and fallback grid use the same nonnegative range.The signal-to-noise window threshold now uses the smooth form
tau_n = sqrt(2 * log(exp(2) + n))in place ofmax(2, sqrt(2 * log(n))). The two agree to within 0.05 percent for n at or above 1000 and select identical windows on realistic data, so coverage and width are unchanged; the new form only regularises the small-n behaviour smoothly (tau -> 2asn -> 0) and removes the hardmax()floor. Following referee feedback, the window rule is now documented as a calibrated heuristic rather than a strict bound.
rbbnp 1.1.0
CRAN release: 2026-06-09
This release improves how the frequency window for smoothness estimation is chosen. By default the confidence bands are now narrower, and regression bands are always finite. The previous behaviour is still available (see the note below).
Highlights
A new default window rule (
methods_get_xi = "snr"). The upper cutoff frequency is now chosen from the signal-to-noise ratio of the empirical Fourier transform. The original rule of Schennach (2020) relies on a worst-case bound that selects no frequency at realistic sample sizes, so the package used to fall back to a wide window that gave a flat smoothness envelope and very wide bands. The new rule always returns a usable window and produces confidence intervals roughly 0.4 times as wide.More accurate regression bias bounds. Two corrections are now on by default.
noise_floor = "auto"uses the noise floor appropriate for a general response, andenvelope_use_Y = TRUEfits the smoothness envelope to the joint spectrum ofYandXrather than the marginal spectrum ofX, which had under-estimated the bias.Finite bands for difficult cases (
integer_r = TRUE). When the data do not show a clear power-law decay, the fitted slope can fall below the minimum the method assumes. It is now raised to that minimum and the amplitude refit, which keeps the bias bound finite. This avoids the very wide bands that could otherwise appear for very smooth densities or polynomial conditional means. A warning is shown when this adjustment is made.Refreshed plots. Density, regression, and Fourier-transform plots now use a cleaner theme with a colorblind-friendly palette and a legend. The Fourier-transform plot shows a wider frequency range with the selected window shaded, so you can see where the signal gives way to noise; the new
xi_rangeandexpandarguments control the displayed range. Custom colors throughfill_ciandfill_biasstill work.
rbbnp 1.0.0
First stable release with a modern S3 interface, performance improvements, and expanded documentation.
Highlights
- Stable S3 API for density and regression objects (
bbnp_density,bbnp_regression). - Bias-bound inference with MSE-optimal bandwidths (no undersmoothing), following Schennach (2020).
- Faster bandwidth selection (FFT-based CV) and improved A/r estimation (LP-based envelope).
- Expanded vignettes and pkgdown website.
rbbnp 0.3.0 (development)
CRAN release: 2025-04-30
This release focuses on modernizing the package interface and improving performance.
Highlights
Modern S3 interface:
biasBound_density()andbiasBound_condExpectation()now return S3 objects (bbnp_density,bbnp_regression) with standard methods:print(),summary(),plot(),coef(),confint(), andfitted()(regression).-
More faithful implementation of Schennach (2020):
- Improved estimation of smoothness parameters (A, r) using a linear-programming formulation.
-
Performance improvements:
- Faster bandwidth cross-validation via an FFT-based approach for larger samples.
- Vectorized conditional variance computation to reduce bottlenecks.
-
Docs & usability:
- Expanded vignettes and pkgdown website organization.