Justin Thong
2017-Mar-21 10:21 UTC
[R] Kernel Density Estimation: Generate a sample from Epanechnikov Kernel
Below are samples from a kernel density estimated "data" with gaussian kernel. I really like this solution of estimation of a kernel because it is nice and elegant. fit<-density(data) rnorm(N, sample(data, size = N, replace = TRUE), fit$bw) #samples from kernel density estimation I am however interested in generating a kernel density estimate with an Epanechnikov kernel fit<-density(data,kernel = "epanechnikov") #is there a quick way to compute the samples and INCORPORATING THE BANDWIDTH of the #kernel density estimate Yours sincerely, Justin *I check my email at 9AM and 4PM everyday* *If you have an EMERGENCY, contact me at +447938674419(UK) or +60125056192(Malaysia)* [[alternative HTML version deleted]]