Yes, that is basically truncation, but the original poster said they wanted something fast and did not give detail. If they just wanted some data to put into a glm model to demonstrate, then this would work. Another idea that I had is instead of dropping all the extreme values, is take the extreme values and replace them with a new draw, this would still allow for the possibility of some extreme values, but would reduce the number of them. This fits the idea "if my results don't match what I expected, something must have gone wrong and I will just do it again" that is sometimes seen in researchers who don't fully understand the idea of variation (Mendel's gardener/assistant as a possible example). Another approach: One way to think of a regular Poisson process is to have several bins and place objects in the bins at random. If the probability of placing something into a bin is independent of how many objects are already in that bin (and the others) then the counts of objects per bin will follow a Poisson distribution. Doing the same thing but having the probability of which bin to place the object into depend on the number of objects already in bins would lead to over or under dispersion (over if the next object is more likely to go into bins already containing objects, under if more likely to go into bins containing no/fewer objects). It should not be too hard to write a function that would put m balls in n bins based on a probability model proportional to current counts, some experimentation would probably be needed to get the probability model to match the amount of over/under-dispersion desired. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.snow at imail.org 801.408.8111
-----Original Message-----
From: Gerard M. Keogh [mailto:GMKeogh at justice.ie]
Sent: Thursday, December 04, 2008 10:34 AM
To: Greg Snow
Cc: R-help at r-project.org; r-help-bounces at r-project.org; Ren? Holst
Subject: Re: [R] Simulating underdispersed counts
V interesting point Greg.
But are you not just suggesting left and right truncation?
It strikes me that if the data are Poission then a mixture is likely to
be
better - something akin to zero-deflated.
Neg binomail works for greater variance == mix a gamma and poisson, but
I'm
unsure what to mix to deflate the variance - maybe bernoulli.
In any event, one possibility is that the data are dependnent (e.g.
family
data) so to get a underdispersion you could draw from the poisson and
then
redraw from the result based on some condition such as closeness (e.g.
as a
proxy for family size).
Hope this helps!
Gerard
Greg Snow
<Greg.Snow at imail.
org>
To
Sent by: Ren? Holst <rho at aqua.dtu.dk>,
r-help-bounces at r- "R-help at r-project.org"
project.org <R-help at r-project.org>
cc
04/12/2008 17:21
Subject
Re: [R] Simulating
underdispersed
counts
Accurate probably depends on what exactly you want to accomplish with
the
simulation, but one simple approach would be to generate more data than
you
need from a regular Poisson distribution, then throw away the extreme
values on both sides.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org
801.408.8111
-----Original Message----- From: r-help-bounces at r-project.org [mailto:r-help-bounces at r- project.org] On Behalf Of Ren? Holst Sent: Thursday, December 04, 2008 6:40 AM To: R-help at r-project.org Subject: [R] Simulating underdispersed counts Hello, Anyone who knows a fast and accurate algorithm for generating draws from an underdispersed Poisson distribution. Or even better, if there is a package containing such an implementation. Thanks Rene
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting- guide.html and provide commented, minimal, self-contained, reproducible code.
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. *********************************************************************** *********** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. It is the policy of the Department of Justice, Equality and Law Reform and the Agencies and Offices using its IT services to disallow the sending of offensive material. Should you consider that the material contained in this message is offensive you should contact the sender immediately and also mailminder[at]justice.ie. Is le haghaidh an duine n? an eintitis ar a bhfuil s? d?rithe, agus le haghaidh an duine n? an eintitis sin amh?in, a bhearta?tear an fhaisn?is a tarchuireadh agus f?adfaidh s? go bhfuil ?bhar faoi r?n agus/n? faoi phribhl?id inti. Toirmisctear aon athbhreithni?, atarchur n? leathadh a dh?anamh ar an bhfaisn?is seo, aon ?s?id eile a bhaint aisti n? aon ghn?omh a dh?anamh ar a hiontaoibh, ag daoine n? ag eintitis seachas an faighteoir beartaithe. M? fuair t? ? seo tr? dhearmad, t?igh i dteagmh?il leis an seolt?ir, le do thoil, agus scrios an t-?bhar as aon r?omhaire. Is ? beartas na Roinne Dl? agus Cirt, Comhionannais agus Athch?irithe Dl?, agus na nOif?g? agus na nGn?omhaireachta? a ?s?ideann seirbh?s? TF na Roinne, seoladh ?bhair chol?il a dh?chead?. M?s rud ? go measann t? gur ?bhar col?il at? san ?bhar at? sa teachtaireacht seo is ceart duit dul i dteagmh?il leis an seolt?ir l?ithreach agus le mailminder[ag]justice.ie chomh maith. *********************************************************************** ************