Re: [R] random generation for a quasi distribution

From: Spencer Graves <>
Date: Sun 11 Jun 2006 - 06:29:04 EST

          Any "quasi distribution" is not well defined, which is why it is called "qausi". Users decide that its likelihood "looks like" some other distribution, e.g. a Poisson, but it is "overdispersed".

          If you want to simulate a "quasi binomial", you have to select a plausible "overdispersion" mechanism. You could for example decide that the Poisson parameter follows a lognormal or a gamma distribution. Then simulate the lognormal or gamma random variables and use those to simulate the poisson.


 > set.seed(5)
 > (Lam <- rlnorm(2, sdlog=9))
[1] 5.168803e-04 2.576182e+05
 > rpois(2, Lam)
[1] 0 257885

	  hope this helps
	  Spencer Graves

hugues wrote:
> Dear R-Help,
> As with the rpois() function to generate random data for a poisson
> distribution, I need to generate random data for a quasi distribution with
> var=mu^2.
> Does anyone known how to do this?
> Thanks in advance,
> [[alternative HTML version deleted]]
> ______________________________________________
> mailing list
> PLEASE do read the posting guide! mailing list PLEASE do read the posting guide! Received on Sun Jun 11 09:56:27 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sun 11 Jun 2006 - 12:11:09 EST.

Mailing list information is available at Please read the posting guide before posting to the list.