> a more patchwork approach may be needed. More respectable language, please! :-) e.g. a piecewise definition may be needed.
----- Original Message ----- From: John Randall <[EMAIL PROTECTED]> Date: Thursday, August 14, 2008 8:41 Subject: Re: [Jprogramming] general Gamma distribution To: Programming forum <[email protected]> > Roger Hui wrote: > >> John's version relies on ! which is limited to !170. > When the mean > >> exceeds > >> 170, as Mr. Hui suggested, perhaps the function should > simply return a > >> call > >> to the normal function. > > > > Alternatively, you could recode tpdf to use equation 5 in > > http://mathworld.wolfram.com/Studentst-Distribution.html > > and compute the ratio (gamma 0.5*1+x)%gamma 0.5*x > > not directly but by */vec0%vec1 . > > > > Separately, another possibility is to use the exact method > > up to its limit and apply integration on the remaining tail. > > Some of this depends on what accuracy you are shooting for and > over what > domain. SPSS regards 3 decimal places as adequate for P- > values; as a rule > of thumb, you can use the normal distribution if the number of > degrees of > freedom is over 30; and you never need y large (apart from nu=1, > all the > critical values for alpha=0.005 are less than 10). If the > aim is to > produce a function accurate over a larger domain, a more patchwork > approach may be needed. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
