adaptive kernel density

  1. L

    Getting a cdf equal to 1 from a variable kernel density estimation

    When I integrate the variable kernel density estimation of a sample from -inf to inf, I should get 1. But it is not what I get with my code below. I find a value higher than 2. How can I fix this? n<-1000 df <- data.frame(x=unlist(lapply(1, function(i) rnorm(n, 0,sd=1))))...