Hi, Is there available package on the optimization function using Newton-Raphson method (iterative quadratic approximation)? I have been using the 'optim' function in R and found it really unstable (it depends heavily on the initial values and functional forms). If I have to code it by myself, can I get some advice on how to start (any good reference or sample code)? I really appreciate any help. thanks, Michael [[alternative HTML version deleted]]
On 11/08/11 11:36, michael wrote:> Hi, > > Is there available package on the optimization function using > Newton-Raphson method (iterative quadratic approximation)? I have been using > the 'optim' function in R and found it really unstable (it depends heavily > on the initial values and functional forms). If I have to code it by myself, > can I get some advice on how to start (any good reference or sample code)? I > really appreciate any help.I find it very strange that you say that optim() is ``unstable''. I have never found it so. In problems that I have worked on involving hidden Markov models (maximizing the likelihood thereof) I have found Newton's method to break down frequently whereas optim() never failed to yield a sensible result. I don't understand why you refer to the Newton-Raphson method (more properly called just Newton's method) as ``iterative *quadratic* approximation''. Newton's method uses just the first order Taylor series approximation to the function whose zeros are sought. All that being said, I have written a function which effects Newton's method. Email me off-list if you would like me to provide this function. cheers, Rolf Turner
> -----Original Message----- > From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] > On Behalf Of michael > Sent: Wednesday, August 10, 2011 4:37 PM > To: r-help at r-project.org > Subject: [R] Need help on Newton-Raphson optimization > > Hi, > > Is there available package on the optimization function using > Newton-Raphson method (iterative quadratic approximation)? I have been > using > the 'optim' function in R and found it really unstable (it depends heavily > on the initial values and functional forms). If I have to code it by > myself, > can I get some advice on how to start (any good reference or sample code)? > I > really appreciate any help. > > thanks, > > Michael >If you do a Google search using 'R optimization newton raphson' you will find lots of relevant hits. Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA
michael wrote:> > Hi, > > Is there available package on the optimization function using > Newton-Raphson method (iterative quadratic approximation)? I have been > using > the 'optim' function in R and found it really unstable (it depends heavily > on the initial values and functional forms). If I have to code it by > myself, > can I get some advice on how to start (any good reference or sample code)? > I > really appreciate any help. >Without an example of your "issue" you really can't expect helpful answers. What are you trying to do? Solving a system of nonlinear equations? (you could have a look at package nleqslv) Minimizing/maximizing a function? (R also provides the function nlm) You should have a look at the CRAN Task View page Optimization and Mathematical Programming (http://cran.r-project.org/web/views/Optimization.html) Berend -- View this message in context: http://r.789695.n4.nabble.com/Need-help-on-Newton-Raphson-optimization-tp3734578p3735014.html Sent from the R help mailing list archive at Nabble.com.