rlcv {rlcv} | R Documentation |
Robust likelihood cross validation bandwidth for univariate densities
Description
Robust likelihood cross validation bandwidth for univariate densities
Usage
rlcv(x.obs, x.new = NULL)
Arguments
x.obs |
Training (observed) data |
x.new |
Evaluation data; default to x.obs |
Value
fhat: density evaluated at x.new; h: bandwidth
Author(s)
Ximing Wu xwu@tamu.edu
References
Wu, Ximing (2019), "Robust Likelihood Cross Validation for Kernel Density Estimation," Journal of Business and Economic Statistics, 37(4): 761-770.
Examples
x=rt(200,df=5)
x.new=seq(-5,5,length=100)
fit=rlcv(x.obs=x,x.new=x.new)
# Mean squared errors
f0=dt(x.new,df=5)
mean((f0-fit$fhat)^2)
matplot(x.new,cbind(f0,fit$fhat),type='l')
[Package rlcv version 1.0.0 Index]