sum(dgenpois0(0:1000, theta = 2, lambda = 0.5))
if (FALSE) theta <- 2; lambda <- 0.2; y <- 0:10
proby <- dgenpois0(y, theta = theta, lambda = lambda, log = FALSE)
plot(y, proby, type = "h", col = "blue", lwd = 2, ylab = "Pr(Y=y)",
main = paste0("Y ~ GP-0(theta=", theta, ", lambda=",
lambda, ")"), las = 1, ylim = c(0, 0.3),
sub = "Orange is the Poisson probability function")
lines(y + 0.1, dpois(y, theta), type = "h", lwd = 2, col = "orange")
Run the code above in your browser using DataLab