Skip to contents

Bagging bootstrap bandwidth selector for Parzen-Rosenblatt estimator

Usage

hboot_bag(
  x,
  m = n,
  N = 1,
  nb = 1000L,
  g,
  lower,
  upper,
  ncores = parallel::detectCores(logical = FALSE)
)

Arguments

x

Vector. Sample.

m

Positive integer. Size of the subsamples.

N

Positive integer. Number of subsamples.

nb

Positive integer. Number of bins.

g

Positive real number. Pilot bandwidth.

lower

Positive real number. Range over which to minimize, left bound.

upper

Positive real number. Range over which to minimize, right bound.

ncores

Positive integer. Number of cores with which to parallelize the computations.

Value

Bagged CV bandwidth.

Details

Bagging bootstrap bandwidth selector for the Parzen-Rosenblatt estimator.

Examples

set.seed(1)
x <- rnorm(10^5)
hboot_bag(x, 5000, 10, 1000, lower=0.001, upper=1, ncores=2)
#> [1] 0.1070447