Re: [R] Non-linear minimization

From: <>
Date: Wed 09 Mar 2005 - 11:15:07 EST

After some experimentation, I have had very good luck with the rgenoud package. It handles box constraints well and for small problems its slow speed has not been much of a problem. It has worked for me on Windows, Macintosh, and Linux.

JPMorgan Asset Management


| | Sébastien Ballesteros|
| | <sebastien_ballestero|
| |> |
| | Sent by: |
| | r-help-bounces@stat.m|
| | |
| | |
| | |
| | 03/08/2005 08:23 AM |
| | |
|---------+--------------------------------> >-----------------------------------------------------------------------------------------------------------------------------| | | | To: | | cc: | | Subject: [R] Non-linear minimization | >-----------------------------------------------------------------------------------------------------------------------------|

hello, I have got some trouble with R functions nlm(), nls() or optim() : I would like to fit 3 parameters which must stay in a precise interval. For exemple with nlm() :

fn<-function(p) sum((dN-estdata(p[1],p[2],p[3]))^2) out<-nlm(fn, p=c(4, 17, 5),

with estdata() a function which returns value to fit with dN (observed data vactor)

My problem is that only optim() allows me to set parameters interval with "L-BFGS-B" method but this one doesn't work in my case.

I have heard about nls2 package ( but it doesn't work on Windows.

Do you know any solutions

Thank's a lot for reading my post

Best regards

INA P-G ecology dpt mailing list PLEASE do read the posting guide!

This communication is for informational purposes only. It is not intended as an offer or solicitation for the purchase or sale of any financial instrument or as an official confirmation of any transaction. All market prices, data and other information are not warranted as to completeness or accuracy and are subject to change without notice. Any comments or statements made herein do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries and affiliates mailing list PLEASE do read the posting guide! Received on Wed Mar 09 11:30:58 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:41 EST