sum(dgenpois1(0:1000, meanpar = 5, dispind = 2))
if (FALSE) dispind <- 5; meanpar <- 5; y <- 0:15
proby <- dgenpois1(y, meanpar = meanpar, dispind)
plot(y, proby, type = "h", col = "blue", lwd = 2, ylab = "P[Y=y]",
main = paste0("Y ~ GP-1(meanpar=", meanpar, ", dispind=",
dispind, ")"), las = 1, ylim = c(0, 0.3),
sub = "Orange is the Poisson probability function")
lines(y + 0.1, dpois(y, meanpar), type = "h", lwd = 2, col = "orange")
Run the code above in your browser using DataLab