1
ggplot()+aes(X)+geom_density()+ 
  stat_function(fun = dpois, colour = "red", args = list(lambda=parms$estimate))+
  xlab( "confirmation time [s]") + ggtitle("Shape of curve");

leads to:

enter image description here

but if args = list(mean = mean(X),sd = sd(X))) we get a nice normal distribution:

enter image description here

How can you explain this strange behavior?

Mike Wise
  • 22,131
  • 8
  • 81
  • 104
Roland Kofler
  • 1,332
  • 1
  • 16
  • 33
  • Have a look at http://stackoverflow.com/questions/28073783/ggplot-poisson-density-curve-why-zigzag-lines. Also, add a reproducible example to your question. – Divi Jun 12 '16 at 18:14

0 Answers0