Skip to content
Prev 174154 / 398506 Next

geometric mean of probability density functions

If you make your calls to density with common lenth and interval  
parameters you should be able to get better "registration":

  ?density
# this example sums the squared differences
  x <- rnorm(200,1,1)
  x2 <- rnorm(200,1,1)
  d1 <- density(x, n=512, from=-1, to= 4)
  d2 <- density(x2, n=512, from=-1, to= 4)
  ssq <- sum( (d1$y - d2$y)^2 )
  ssq