Recent content by Lio67

  1. L

    Comparing two estimated distributions

    I estimated the density function (adaptive kde) from two samples (one of small size) and the cdf using approxfun() and integrate() in R. Now, I would implement a ks test to know if the two distributions are similar. I guess I have two options: Either, I draw two samples and use the function...
  2. 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))))...