[R] newton.method

David Winsemius dwinsemius at comcast.net
Thu Jul 29 13:34:20 CEST 2010


On Jul 29, 2010, at 4:32 AM, sammyny wrote:

>
> Hi,
> Is this method broken in R?

 > ?newton.method
No documentation for 'newton.method' in specified packages and  
libraries:
you could try '??newton.method'

If you are asking about a non-base function, you are asked by the  
Posting Guide to supply the package name. You can do that in the text  
of you message or by providing code that starts out with:

require(package)

You are further asked to provide the code and data you used.

You are finally asked to contact the package maintainer if you believe  
that a package function is not providing correct results.


So  .... read the Posting Guide.

-- 
David.
> I am using it to find roots of the following
> function:
> f(x) = 2.5*exp(-0.5*(2*0.045 - x)) + 2.5*exp(-0.045) +  
> 2.5*exp(-1.5*x) - 100
>
> It is giving an answer of -38.4762403 which is not even close (f(x) =
> 2.903809e+25 for x=-38.4762403). The answer should be around  
> 0.01-0.1. This
> function should converge..
>
> Even for a simple function like  f(x) = exp(-x) * x, it gives answer  
> as
> 8.89210984 for which f(x) = 0.001222392 and I set tolerance to  
> 10^-12..
>
> Also, is there a non graphical version of newton method? I looked at  
> nleqslv
> but have no idea how to use it..
>
> Thanks for your help.
> --



More information about the R-help mailing list