[R] newton method

2010-07-22 Thread saminny
Is there a non animation version of newton.method (http://bm2.genes.nig.ac.jp/RGM2/R_current/library/animation/man/newton.method.html) for finding roots of a function? It should find the roots without showing it on the GUI. thanks, Sam -- View this message in context:

Re: [R] newton method

2010-07-22 Thread Berend Hasselman
saminny wrote: Is there a non animation version of newton.method (http://bm2.genes.nig.ac.jp/RGM2/R_current/library/animation/man/newton.method.html) for finding roots of a function? It should find the roots without showing it on the GUI. Have a look at package nleqslv /Berend -- View

Re: [R] newton method for single nonlinear equation

2010-01-26 Thread Berend Hasselman
Roslina Zakaria wrote: newton.inputsingle - function(pars,n) {  runi    - runif(974, min=0, max=1)    lendt   - length(runi)    ## Parameter to estimate    z - vector(length=lendt, mode= numeric)    z  - pars[1]       ## Constant value        alp  - 2.0165 ; rho - 0.868;    c   

[R] Newton method

2010-01-26 Thread Roslina Zakaria
Hi r-users,   I hope somebody can help me with this code. I would like to solve for z values using newton iteration method.  I 'm not sure which part of the code is wrong since I'm not very good at programming but would like to learn.  There seem to be some output but what I expected is a

Re: [R] Newton method

2010-01-26 Thread GlenB
your problem is because f is a vector of the same length as runi as a result, the thing you're trying to assign to z[i+1] is also a vector of that length -- View this message in context: http://n4.nabble.com/Newton-method-tp1311057p1311228.html Sent from the R help mailing list archive at

[R] newton method for single nonlinear equation

2010-01-25 Thread Roslina Zakaria
Hi r-users,   I would like to solve for z values using newton iteration method.  I 'm not sure which part of the code is wrong since I'm not very good at programming but would like to learn.  There seem to be some output but what I expected is a vector of z values.  Thank you so much for any

Re: [R] Newton method again

2009-06-04 Thread Berend Hasselman
Roslina Zakaria wrote: Hi Ravi, I did ask you some question regarding newton method sometime ago..  Now I have fixed the problem and I also wrote 2 looping code (ff1 and ff2) to evaluate the modified Bessel function of the first kind and call them in the newton code.  But I dont't

[R] Newton method again

2009-04-07 Thread Roslina Zakaria
Hi Rolf, I would like to extend the problem that I asked you before regarding the newton method using 4 functions with 4 parameters.  My functions involve the modified bessel function of the first kind which I can type them without any problem. The big problem is the Jacobian matrix. I use

Re: [R] Newton method again

2009-04-07 Thread Ravi Varadhan
Subject: [R] Newton method again To: Rolf Turner r.tur...@auckland.ac.nz, R help forum R-help@r-project.org Hi Rolf, I would like to extend the problem that I asked you before regarding the newton method using 4 functions with 4 parameters.  My functions involve the modified bessel

Re: [R] Newton method again

2009-04-07 Thread Rolf Turner
On 8/04/2009, at 2:31 PM, Roslina Zakaria wrote: Hi Rolf, I would like to extend the problem that I asked you before regarding the newton method using 4 functions with 4 parameters. My functions involve the modified bessel function of the first kind which I can type them without any

Re: [R] newton method

2009-03-24 Thread Yihui Xie
I'm not sure what you meant by a topic on newton's method (algorithm? demo?), but the demonstration in the package 'animation' might help: install.packages('animation') par(pch = 20) ani.options(nmax = 50) newton.method(function(x) 5 * x^3 - 7 * x^2 - 40 * x + 100, 7.15, c(-6.2, 7.1))

Re: [R] newton method

2009-03-23 Thread Rau, Roland
, March 23, 2009 4:35 AM To: Roslina Zakaria Cc: r-help@r-project.org Subject: Re: [R] newton method Take a look at the functionsnlm(), optim() in the stats package and maxNR() in the maxLik package. On Mar 22, 2009, at 11:15 PM, Roslina Zakaria wrote: Does R has a topic on newton's

[R] newton method

2009-03-22 Thread Roslina Zakaria
Hi R-users, Does R has a topic on newton's method? Thank you for the info. __ 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

Re: [R] newton method

2009-03-22 Thread Michael Kubovy
Take a look at the functionsnlm(), optim() in the stats package and maxNR() in the maxLik package. On Mar 22, 2009, at 11:15 PM, Roslina Zakaria wrote: Does R has a topic on newton's method? _ Professor Michael Kubovy University of Virginia Department of

Re: [R] Newton method iteration problem

2007-10-27 Thread kevinchang
Thanks Chales for pointing out the errors. I fixed an errorr and R accepted my rootFinding code. But the problem right now is that my code will work only if the intialX value is close enough to the solution. Otherwise, R says there is missing true/false value in the codition test of while loop.

Re: [R] Newton method iteration problem

2007-10-27 Thread Charles C. Berry
On Sat, 27 Oct 2007, kevinchang wrote: Thanks Chales for pointing out the errors. I fixed an errorr and R accepted my rootFinding code. But the problem right now is that my code will work only if the intialX value is close enough to the solution. Otherwise, R says there is missing

[R] Newton method iteration problem

2007-10-26 Thread kevinchang
Hi all, I am coding for finding the root of f(x)= phi(x) -alpha where phi(x) is the cumulative density function and alpha is constant . The problem right now is I can't get the initialX representing the root out of the while loop when ending , it seems to me it disappear when the loop ends

Re: [R] Newton method iteration problem

2007-10-26 Thread Charles C. Berry
On Fri, 26 Oct 2007, Charles C. Berry wrote: On Fri, 26 Oct 2007, kevinchang wrote: Hi all, I am coding for finding the root of f(x)= phi(x) -alpha where phi(x) is the cumulative density function and alpha is constant . The problem right now is I can't get the initialX representing the