# How to generate under-dispersed Poisson variables in R?

In this article "generate quasi-poisson distribution random variables", it is shown how to use the function rnbinom to simulate overdispersed Poisson data:

rqpois <- function(n, mu, theta) rnbinom(n=n, mu=mu, size=mu/(theta-1)).


The function rqpois works well but it is clearly undefined for values of theta less than one. As such, it can only simulate overdispersed data. And it is unclear to me how to modify the function to simulate under-dispersed data.

The empirical context is a series of (iid) competitions where I expect people to see what the others are doing and decide whether to enter or stay out. The count of entrants is what I am interested in. Empirically I found the data are "underdispersed" (i.e., mean >> var).

• quasi-poisson isn't really a distribution (that's why the quasi). Can you tell us more of the context? Why do you expext/need underdispersion? Then we coud model some mechanism that can produce underdispersion. See this list for some papers. Also google.no/… – kjetil b halvorsen Aug 11 at 22:22
• Thanks for your comment. The context is a competition where I expect people to see what the others are doing and decide whether to enter or stay out. The count of entrants is what I am interested in. Empirically I found the data are "underdispersed" (i.e., mean >> var) – mrb Aug 11 at 22:25
• I observe several independent contests/ – mrb Aug 11 at 22:31
• Could you please add this new information to the original question, by editing it? – kjetil b halvorsen Aug 11 at 22:54
• Certainly you can have a distribution that is quasi-Poisson (i.e. that is discrete, exponential family with the quasi-Poisson variance function) - you can just take a Poisson variate and multiply by a constant. What you can't have is one of those on the non-negative integers (i.e. there's no quasi-Poisson - aside from the Poisson itself - that is really suitable for counts). – Glen_b Aug 11 at 23:28