Hi,
You can use the following relation between standard normal probability distribution (\Phi) and error function:
Erf(z) = 2 * \Phi(\sqrt(2) z) - 1
to evaluate invErf(x) in R as follows:
invErf <- function(x) {
# argument x must lie between -1 and 1
qnorm((1 + x) /2) / sqrt(2)
}
For example,
> invErf(0.5)
[1] 0.4769362762
Hope this helps,
Ravi.
> -----Original Message-----
> From: r-help-bounces@stat.math.ethz.ch [mailto:r-help-
> bounces@stat.math.ethz.ch] On Behalf Of Nathan Dabney
> Sent: Monday, June 26, 2006 3:27 PM
> To: R-help@stat.math.ethz.ch
> Subject: [R] Inverse Error Function
>
> Do any of the R libraries have an implementation of the Inverse Error
> Function (Inverse ERF)?
>
> ref:
> http://mathworld.wolfram.com/InverseErf.html
> http://functions.wolfram.com/GammaBetaErf/InverseErf/
>
> Thanks,
> Nathan
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-
> guide.html
Archive maintained by Robert King, hosted by
the discipline of
statistics at the
University of Newcastle,
Australia.
Archive generated by hypermail 2.1.8, at Tue 27 Jun 2006 - 06:12:51 EST.
Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.