Notice: On March 31, it was **announced** that Statalist is moving from an email list to a **forum**. The old list will shut down on April 23, and its replacement, **statalist.org** is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

From |
"Martin Weiss" <martin.weiss1@gmx.de> |

To |
<statalist@hsphsun2.harvard.edu> |

Subject |
st: RE: RE: RE: RE: RE: RE: RE: Stata stuck in loop with -rndpoi-? |

Date |
Thu, 13 May 2010 17:40:15 +0200 |

<> " look at the code." I don`t get this: Which problem is solved by looking at the code here? I did earlier, and could not tell that the problem was with "exp(710)". Maybe that is just me, maybe not... HTH Martin -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox Sent: Donnerstag, 13. Mai 2010 17:32 To: statalist@hsphsun2.harvard.edu Subject: st: RE: RE: RE: RE: RE: RE: Stata stuck in loop with -rndpoi-? As someone said, if all else fails, look at the code. -viewsource rndpoi- gets you there in one. Nick n.j.cox@durham.ac.uk Karen Wright Thank you very much for the help. Karen >>> "Martin Weiss" <martin.weiss1@gmx.de> 13/05/2010 16:06 >>> <> " You need something with a better algorithm." -genpoisson-, as in -findit genpoisson, does not complain or behave weirdly: ************* clear* set obs 10000 genpoisson x, mu(710) su hist x ************* HTH Martin -----Original Message----- From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Nick Cox Sent: Donnerstag, 13. Mai 2010 16:57 To: statalist@hsphsun2.harvard.edu Subject: st: RE: RE: RE: RE: Stata stuck in loop with -rndpoi-? It's an underflow problem. -rndpoi- at one point calculates exp(-mean), but try . di exp(-710) and you will get 0. Even if you get results for means near 700, they will be of dubious accuracy. You need something with a better algorithm. Alternatively, won't a Poisson with mean 700 look pretty near Gaussian any way? I get the skewness and kurtosis to be . di 1/sqrt(700) .03779645 . di 3 + 1/700 3.0014286 which would cause broad and continuing smiles of pleasure in many branches of statistical science. Nick n.j.cox@durham.ac.uk Nick Cox What I said in 2003 still holds. Nick n.j.cox@durham.ac.uk Martin Weiss Also note Nick`s advice at http://www.stata.com/statalist/archive/2003-08/msg00197.html, though things may have changed materially in the meantime... Karen Wright Unfortunately my IT department has a problem with letting us upgrade Stata, they have to perform it and do not want to - which is why I was trying to do it without the ugrade. Thank you, I shall just have to pester them again! >>> "Martin Weiss" <martin.weiss1@gmx.de> 13/05/2010 14:59:48 >>> You could just upgrade for free to Stata 10.1, and use the -rpoisson()- function... Karen Wright I am attempting to generate 10000 random number based on a poisson distribution with mean from my data, using -rndpoi- (from ssc). I seem to encounter a problem when the mean is greater than 700. Would anyone be able to help me, either with an alternative method of producing the figures I need, or what I am currently doing wrong? ************************ *this works: rndpoi 10000 694.5 *this doesn't: rndpoi 10000 710 ************************ I am currently using Stata 10.0 on Windows. * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/ * * For searches and help try: * http://www.stata.com/help.cgi?search * http://www.stata.com/support/statalist/faq * http://www.ats.ucla.edu/stat/stata/

**Follow-Ups**:**st: RE: RE: RE: RE: RE: RE: RE: RE: Stata stuck in loop with -rndpoi-?***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**References**:**st: Stata stuck in loop with -rndpoi-?***From:*"Karen Wright" <Karen.Wright@icr.ac.uk>

**st: RE: Stata stuck in loop with -rndpoi-?***From:*"Martin Weiss" <martin.weiss1@gmx.de>

**st: RE: Stata stuck in loop with -rndpoi-?***From:*"Karen Wright" <Karen.Wright@icr.ac.uk>

**st: RE: RE: Stata stuck in loop with -rndpoi-?***From:*"Martin Weiss" <martin.weiss1@gmx.de>

**st: RE: RE: RE: Stata stuck in loop with -rndpoi-?***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**st: RE: RE: RE: RE: Stata stuck in loop with -rndpoi-?***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

**st: RE: RE: RE: RE: RE: Stata stuck in loop with -rndpoi-?***From:*"Martin Weiss" <martin.weiss1@gmx.de>

**st: RE: RE: RE: RE: RE: Stata stuck in loop with -rndpoi-?***From:*"Karen Wright" <Karen.Wright@icr.ac.uk>

**st: RE: RE: RE: RE: RE: RE: Stata stuck in loop with -rndpoi-?***From:*"Nick Cox" <n.j.cox@durham.ac.uk>

- Prev by Date:
**st: RE: margeff after the glm command** - Next by Date:
**RE: AW: st: sort of standardization** - Previous by thread:
**st: RE: RE: RE: RE: RE: RE: Stata stuck in loop with -rndpoi-?** - Next by thread:
**st: RE: RE: RE: RE: RE: RE: RE: RE: Stata stuck in loop with -rndpoi-?** - Index(es):