powered by
Univariate kernel density
kde(x.obs, x.new = NULL, h)
Training (observed) data (n1 vector)
Evaluation data (n2 vector); default to x.obs
Bandwidth
Density evaluated at x.new
Wu, Ximing (2019), "Robust Likelihood Cross Validation for Kernel Density Estimation," Journal of Business and Economic Statistics, 37(4): 761-770.
# NOT RUN { x=rnorm(100) x.new=seq(-5,5,length=50) h=1.06*sd(x)*(length(x))^(-1/5) f=kde(x.new=x.new,x.obs=x,h=h) # }
Run the code above in your browser using DataLab