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]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to