This plot shows multiple Poisson distributions for lambda = 1:10):
I tried running the code for Poisson and tried tweaking it to get plots for NB and generalized Poisson distributions but nothing worked.
This plot shows multiple Poisson distributions for lambda = 1:10):
I tried running the code for Poisson and tried tweaking it to get plots for NB and generalized Poisson distributions but nothing worked.
You can consider the following approach :
x_val <- 1 : 10
y_val <- dnbinom(x = x_val, size = 4, prob = 0.99)
plot(x_val, y_val, type = "l")
for(i in 1 : 10)
{
x_val <- 1 : 10
y_val <- dnbinom(x = x_val, size = 4, prob = 0.99 ^ (i + 1))
lines(x_val, y_val, type = "l", col = i)
}