bandwidth: Bandwidth selectors for ordinary nonparametric estimators

density_bandwidthR Documentation

Bandwidth selectors for ordinary nonparametric estimators

Description

Select the bandwidth on the ordinary estimator, as required by the debiasing method. Density estimation uses a normal-reference rule and regression uses K-fold cross-validation of the ordinary local-linear smoother.

Usage

density_bandwidth(x, method = "normal_reference", candidates = NULL,
  block_size = 512L)

regression_bandwidth(x, y, candidates = NULL, n_folds = 5L,
  random_state = 0L)

Arguments

x

Numeric observations or covariates.

y

Numeric responses.

method

For density estimation, either "normal_reference" or "cv".

candidates

Optional positive candidate bandwidths for cross-validation.

block_size

Positive pairwise-computation block size for density cross-validation.

n_folds

Number of cross-validation folds.

random_state

Optional local random seed.

Value

A positive numeric scalar.


debiasedInference documentation built on Sept. 29, 2026, 5:09 p.m.