I was trying to carry out a simulation based on the kernel distribution on R. Dataset used - CYG OB1 on the HSAUR2 package. Using the dataset I carried out an analysis to find the Kernel Density Estimate. I was looking to use this Kernel Density to simulate the bivariate values. Code used till now
> CYGOB1d <- bkde2D(CYGOB1, bandwidth = sapply(CYGOB1, dpik))
> plot(CYGOB1, xlab = "log surface temperature", ylab = "log light intensity")
> contour(x = CYGOB1d$x1, y=CYGOB1d$x2, z=CYGOB1d$fhat, add = TRUE)
> persp(x=CYGOB1d$x1, y=CYGOB1d$x2, z = CYGOB1d$fhat, xlab = "log surface
temperature", ylab = "log light intensity", zlab ="density")
How can I carry out a Simulation(1000 runs) based on the Kernel density?