| h.mlcv | R Documentation |
Computes the maximum-likelihood (Kullback-Leibler) cross-validation
bandwidth selector for a kernel density estimator (density estimation
only, deriv.order = 0).
Returns an S4 object of class bandwidth.
h.mlcv(x, kernel = "gaussian", lower, upper, tol, nthreads = 0L)
x |
numeric vector of data values. |
kernel |
character string giving the kernel; one of
|
lower, upper |
bounds of the search interval. Defaults to
|
tol |
convergence tolerance for |
nthreads |
number of OpenMP threads for this call: |
Habbema, Hermans, and Van den Broek (1974) and Duin (1976) proposed maximising the leave-one-out log-likelihood:
MLCV(h) = n^{-1}\sum_{i=1}^{n}
\log\!\left[\hat{f}_{h,i}(X_i)\right]
where the leave-one-out estimator is
\hat{f}_{h,i}(X_i) =
\frac{1}{(n-1)h}\sum_{j \neq i}K\!\left(\frac{X_j-X_i}{h}\right)
Equivalently,
h_{mlcv} = \arg\max_{h}\left(n^{-1}\sum_{i}\log\!\left[
\sum_{j \neq i}K\!\left(\frac{X_j-X_i}{h}\right)\right]
-\log[(n-1)h]\right)
Only applicable to density estimation (r=0).
An S4 object of class bandwidth with slots:
datathe (cleaned) data vector.
kernelname of the kernel used.
deriv.order0L (density only).
hselected bandwidth.
min.objnegative of the maximum MLCV value.
hosover-smoothing bandwidth (upper bound).
method"MLCV".
Arsalane Chouaib Guidoum acguidoum@univ-tam.dz, Amel Henider amel.henider@univ-tam.dz and Iago Giné-Vázquez iago.gin-vaz@protonmail.com
Duin, R. P. W. (1976). On the choice of smoothing parameters for Parzen estimators of probability density functions. IEEE Transactions on Computers, C-25, 1175–1179.
Habbema, J. D. F., Hermans, J. and Van den Broek, K. (1974). A stepwise discrimination analysis program using density estimation. Compstat 1974: Proceedings in Computational Statistics. Physica Verlag, Vienna.
Wand, M. P. and Jones, M. C. (1995). Kernel Smoothing. Chapman and Hall, London.
bandwidth, h.ucv, h.amise, h.scv,
dkde.
x <- rnorm(100)
bw <- h.mlcv(x)
show(bw)
plot(bw)
bw2 <- h.mlcv(x, kernel = "epanechnikov")
show(bw2)
## other kernels on a Marron-Wand sample
h.mlcv(outlier, kernel = "logistic")
h.mlcv(outlier, kernel = "pow(2,2)")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.