Re: [R] random generation for a quasi distribution

From: Spencer Graves <spencer.graves_at_pdf.com>
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.

          Example:

 > 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,
>
> Hugues SANTIN-JANIN.
>
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html 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 https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.