Skip to content
Prev 2094 / 63424 Next

[S] uniroot -- doesn't work recursively

Martin Maechler wrote:
) However, note that R currently has the same problem as S-plus:

) Uniroot() doesn't work reliably, recursively.
) When you found it to be better, you were just lucky.

Right.  I realised later on that R seemed to behave better but 
it could not work properly since it calls a Fortran (66? 77?) routine.
It just happen to produce less obviously wrong answers than Splus.
In fact more tests confirm wrong answers, but not as non-sensical 
as those from Splus.

To get around the problem,  I have replaced  f(x)=0 by f^2(x)=min,
where f(x)is computed with the aid of uniroot(), and the minimization
is solved by optimize(). This works.
Peter Dalgaard BSA wrote:
My R 0.64 is obtained from the binary file distributed by CRAN in Wien
(compiled by Guido Masarotto?), so I do not know which the compiler is 
used.

Thanks for your comments

Regards
Adelchi Azzalini
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._