Skip to contents

Second order bagging CV bandwidth selector for Parzen-Rosenblatt estimator

Usage

tss_dens(x, r, s, h0, h1, nb = 1000, ncores = 1)

Arguments

x

Vector. Sample.

r

Vector. The two subsample sizes.

s

Positive integer. Number of subsamples.

h0

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

h1

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

nb

Positive integer. Number of bins.

ncores

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

Value

Second order bagging CV bandwidth.

Details

Second order bagging cross-validation bandwidth selector for the Parzen-Rosenblatt estimator.

Examples

set.seed(1)
x <- rnorm(10^5)
tss_dens(x, 5000, 10, 0.01, 1, 1000, 2)
#> [1] 0.1037406