Bagged CV bandwidth selector for local polynomial kernel regression.
Usage
bagreg(
x,
y,
r,
s,
h0,
h1,
nb = r,
ncores = parallel::detectCores(),
poly.index = 0
)
Arguments
- x
Covariate vector.
- y
Response vector.
- r
Positive integer. Size of the subsamples.
- 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 to use in cross-validation.
- ncores
Positive integer. Number of cores with which to parallelize the computations.
- poly.index
Non-negative integer defining local constant (0) or local linear (1) smoothing. Default value: 0 (Nadaraya-Watson estimator).