rlcv_d | R Documentation |
Robust likelihood cross validation bandwidth for multivariate kernel densities
rlcv_d(x.obs, x.new = NULL)
x.obs |
Training (observed) data (n1 by d matrix, d>=2) |
x.new |
Evaluation data (n2 by d matrix, d>=2); default to x.obs |
fhat: density evaluated at x.new; h: bandwidth
Ximing Wu xwu@tamu.edu
Wu, Ximing (2019), "Robust Likelihood Cross Validation for Kernel Density Estimation," Journal of Business and Economic Statistics, 37(4): 761-770.
# old faithful data x=datasets::faithful x=cbind(x[,1],x[,2]) fit=rlcv_d(x.obs=x) # evaluation data x1=seq(min(x[,1])*.8,max(x[,1])*1.2,length=30) x2=seq(min(x[,2])*.8,max(x[,2])*1.2,length=30) x11=rep(x1,each=30) x22=rep(x2,30) fhat=kde_d(x.new=cbind(x11,x22),x.obs=x,h=fit$h) persp(x1,x2,matrix(fhat,30,30))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.