computeBandwidth {RDM}R Documentation

Compute bandwidth via cross-validation

Description

An implementation of the cross-validation principle for the bandwidth selection as presented in Strothmann, Dette and Siburg (2022) <arXiv:2201.03329>.

Usage

computeBandwidth(X, sL, sU, method = c("cvsym", "cvasym"), reduce = TRUE)

Arguments

X

A bivariate data.frame containing the observations. Each row contains one observation.

sL

Lower bound N^{sL} for the possible bandwidth parameters (where N is the number of observations).

sU

Upper bound N^{sU} for the possible bandwidth parameters (where N is the number of observations).

method

"cvsym" uses either a symmetric cross-validation principle (N_1 = N_2) and "cvasym" uses an asymmetric cross-validation principle (i.e. N_1 and N_2 may attain different values).

reduce

In case reduce is set to TRUE, the parameter is chosen from N, N+2, ... instead of N, N+1, N+2, ...

Details

This function computes the optimal bandwidth given the bivariate observations X of length N. Currently, there are two different algorithms implemented:

Value

The chosen bandwidth depending on the data.frame X.

Examples

n <- 20
X <- cbind(runif(n), runif(n))
computeBandwidth(X, sL = 0.25, sU = 0.5, method="cvsym", reduce=TRUE)

[Package RDM version 0.1.1 Index]