Calculates the optimal bandwidth via cross-validation

compak_CVbandwidth(a.sample, interval = c(0.025, 1), workers = 1L)

Arguments

a.sample

numeric vector; the data sample from which the estimate is to be computed.

interval

numeric vector; the end-points of the interval to be searched for the best bandwidth.

workers

numeric; a positive integer to represent the number of cores used for parallel processing to evaluate the kde

Value

The optimal bandwidth parameter within the interval.

Examples

data(days) h.CV <- compak_CVbandwidth(days)