Peter Dalgaard wrote:
> sun wrote:
>> I am converting some matlab code into R that use inverse of the 
>> complementary error function, erfcinv and did not find an equivalent in 
>> R, is there such a function in some contributed modules?
>>
>>   
> Basically, it is qnorm() with suitable scaling. The help page for Normal 
> has the construction for erfc() from pnorm()  so just solve erfc(x) = y 
> for x.
> 
Thanks for your quick answer and useful information!
But please forgive my ignorance, I do not really know how to solve this 
inverse function actually.
for example,

 >erfc <- function(x) 2 * pnorm(x * sqrt(2), lower = FALSE)
 > erfc(0.3)
[1] 0.6713732

How do I find 0.3  given 0.6713732?

Thanks!

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to