You can use the 'rnegbin' function within the 'mass' library to generate a random sample from the negative binomial distribution, which is a gamma mixture of Poissons. Neal
Dear S-news list readers,
I am carrying out some simulations in which I need to generate overdispersed poisson data. The rpois function only takes sample size and mean as its arguments. What do I need to do to create overdispersed poisson data? I apologize if this is a naïve question. A search of the archives revealed nothing on this subject.
Many thanks for your help.
Manuela
>::<>::<>::<>::<>::<>::<>::<>::<>::<>::<
Manuela Huso
Consulting Statistician
Department of Forest Science
201H Richardson Hall
Oregon State University
Corvallis, OR 97331
ph: 541.737.6232
fx: 541.737.1393