Description Usage Arguments Value Examples
View source: R/compak_KLbandwidth.R
Calculates the optimal bandwidth via minimising Kullback-Leibler divergence
1 | compak_KLbandwidth(a.sample, x = NULL, interval = c(0.025, 1), workers = 1L)
|
a.sample |
numeric vector; the data sample from which the estimate is to be computed. |
x |
a numeric vector: the points of the grid at which the density is to be estimated. This vector should be considerable longer than the range of the a.sample. If NULL, the function will populate the vector for you using a Chebyshev's Inequality type argument. |
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 compak smoother. |
The optimal bandwidth parameter within the interval
1 2 | data(days)
h.KL <- compak_KLbandwidth(days)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.