> The particular issue I'm having is trying to come up with a
> way to calculate equation 18 on
> http://mathworld.wolfram.com/InverseErf.html
I haven't read this thread (and I'm no mathematician), so my apologies if my
answer is redundant, insufficient, or irrelavant.
This question appears related to the "Inverse CDF" thread a while back [1] in
which John pointed [2] at this page:
http://home.online.no/~pjacklam/notes/invnorm/
Now, as I said, I'm no mathematician. Which means I don't know what this
function is or what it does, but I nevertheless coded it
up in J:
http://jsoftware.com/svn/DanBron/trunk/uncategorized/inverse_cdf.ijs
The algorithm is spelled out in pseudocode at the first link, along with
implementations in many languages, so it was a pretty
straightforward translation even in my ignorance.
My confidence in the J code was bolstered by the fact that my plot looks like
the plot on the original page, and because I coded
it up 3 different ways: naive explicit (invCDF0) , optimized explicit
(invCDF1), and tacit (invCDF2), and all their results agree.
If this code is helpful to you at all, I recommend you use invCDF1 , the
optimized explicit version, because its performance is
much better than the naive explicit version, and not much worse than the tacit
version, while being much more straightforward
(hence, easier to maintain) than the latter.
I guess I should email the maintainer of that page with the code, so that J is
represented among the implementations.
-Dan
[1] Inverse CDF thread
http://jsoftware.com/pipermail/programming/2008-September/011978.html
[2] John's response
http://jsoftware.com/pipermail/programming/2008-September/011987.html
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm