> From: Fraser Jackson > > Dan's thanks for posting your interesting code. There is a function > qnorm > in the addon 'stats/distribs' which provides this inverse. See > http://www.jsoftware.com/jwiki/Addons/stats/distribs >
Don, On that wiki page there are also alternative implementations of Acklam's algorithm: qnorm01_acklam_fast and qnorm01_acklam_accurate and some discussion about why we ended up choosing qnorm for the stats/distribs addon. (invCDF1 -: qnorm01_acklam_fast) TEST 1 (invCDF1 -: qnorm_acklam_accurate) TEST 0 *./ 1e_8 > |(invCDF1 - qnorm_acklam_accurate) TEST 1 *./ 1e_14 > |(qnorm_acklam_accurate - qnorm) TEST 1 > On testing, the deviations between the two functions agree to within at > least between 8 and 9 significant digits and I have not attempted to do > any checks as to which is the more accurate. For test data with small > numbers of observations your code seems to run faster but qnorm is > faster for larger array arguments. > > Code for the uniform, binomial and poisson is now in preparation and > should > be added soon. As noted in the Wiki contributions are very welcome. > To > help avoid any unnecessary duplication please communicate with Ric or > me > about them off forum. > > Fraser > > > ----- Original Message ----- > From: "Dan Bron" <[email protected]> > To: "'Programming forum'" <[email protected]> > Sent: Saturday, March 28, 2009 6:12 AM > Subject: Re: [Jprogramming] Inverse Error Function > > > >> > http://jsoftware.com/svn/DanBron/trunk/uncategorized/inverse_cdf.ijs > > > > Whoops. Running the code in a profile-less J session gives me a > value > > error on ts . Before you run the script, be sure to > > define: > > > > ts =: 6!:2 , 7!:2@:] > > > > or edit the script and remove everything from TEST =: ... onward. > > > > -Dan > > > > --------------------------------------------------------------------- > - > > For information about J forums see > http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
