Re: [R] Is DUD available in nls()?
Bert Gunter gunter.berton at gene.com writes: I certainly second all Jeff's comments. **HOWEVER** : http://www.tandfonline.com/doi/pdf/10.1080/00401706.1978.10489610 IIRC, DUD's provenance is old, being originally a BMDP feature. If you want to do derivative-free nonlinear least-squares fitting you could do something like: library(bbmle) dnorm2 - function(x,mean,log=FALSE) { ssq - sum((x-mean)^2) n - length(x) dnorm(x,mean,sd=ssq/n,log=log) } mle2(y~dnorm2(mean=a*x^b),data=...,method=Nelder-Mead) This is not necessarily the most efficient/highly tuned possibility, but it is one reasonably quick way to get going (you can substitute other derivative-free optimizers, e.g. library(optimx) mle2(...,optimizer=optimx,method=bobyqa) (I think). This isn't the exact algorithm you asked for, but it might serve your purpose. Ben Bolker __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Is DUD available in nls()?
One of the reasons DUD is not available much any more is that methods have evolved: - nls (and nlxb() from nlmrt as well as nlsLM from minpack.LM -- which are more robust but may be less efficient) can use automatic derivative computation, which avoids the motive for which DUD was written - DUD came about, as Bert noted, in a period when many methods were being tried. I recall being at one of the first talks about DUD by Mary Ralston. It seems to work well on the examples used to illustrate it, but I have never seen a good comparative test of it. I think this is because it was always embedded in proprietary code, so not properly available for scrutiny. (If I'm wrong in this, I hope to be enlightened as to source code. I did find a student paper, but it tests with SAS.) - Marquardt methods, as in nlmrt and minpack.LM, generally have a better track record. They can be used with numerical derivative approximations (numDeriv, for example) with R functions rather than expressions (nlfb from nlmrt, and one of the other minpack.LM routines), in which case one gets a form of secant method. - Ben's mention of bobyqa leads to a different derivative-free minimizer that approximates the surface and minimizes that. John Nash Date: Tue, 2 Apr 2013 07:22:33 + From: Ben Bolker bbol...@gmail.com To: r-h...@stat.math.ethz.ch Subject: Re: [R] Is DUD available in nls()? Message-ID: loom.20130402t091830-...@post.gmane.org Content-Type: text/plain; charset=us-ascii Bert Gunter gunter.berton at gene.com writes: I certainly second all Jeff's comments. **HOWEVER** : http://www.tandfonline.com/doi/pdf/10.1080/00401706.1978.10489610 IIRC, DUD's provenance is old, being originally a BMDP feature. If you want to do derivative-free nonlinear least-squares fitting you could do something like: library(bbmle) dnorm2 - function(x,mean,log=FALSE) { ssq - sum((x-mean)^2) n - length(x) dnorm(x,mean,sd=ssq/n,log=log) } mle2(y~dnorm2(mean=a*x^b),data=...,method=Nelder-Mead) This is not necessarily the most efficient/highly tuned possibility, but it is one reasonably quick way to get going (you can substitute other derivative-free optimizers, e.g. library(optimx) mle2(...,optimizer=optimx,method=bobyqa) (I think). This isn't the exact algorithm you asked for, but it might serve your purpose. Ben Bolker __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Is DUD available in nls()?
Bert Gunter gunter.berton at gene.com writes: I certainly second all Jeff's comments. **HOWEVER** : http://www.tandfonline.com/doi/pdf/10.1080/00401706.1978.10489610 IIRC, DUD's provenance is old, being originally a BMDP feature. Thanks for the pointer. That seems to be an interesting derivative-free approach, specialized for least-squares problems. I will take a closer look, as it might be a nice addition for the 'dfoptim' package for derivative-free optimization. -- Hans Werner Jeff Newmiller jdnewmil at dcn.davis.ca.us writes: a) Read the Posting Guide. [...] b) Regarding your DUD algorithm, it doesn't sound familiar. There are many algorithms that don't use derivatives for optimization so it isn't clear that this is a referenceable label. The help file for nls mentions two algorithms that don't require derivatives. You might want to review the CRAN Task View on Optimization and Mathematical Programming if you want to know more about what is available in CRAN and base R. qi A send2aqi at gmail.com writes: SAS has DUD (Does not Use Derivatives)/Secant Method for nonlinear regression, does R offer this option for nonlinear regression? I have read the helpfile for nls() and could not find such option, any suggestion? Thanks, Derek __ 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 commented, minimal, self-contained, reproducible code.
[R] Is DUD available in nls()?
SAS has DUD (Does not Use Derivatives)/Secant Method for nonlinear regression, does R offer this option for nonlinear regression? I have read the helpfile for nls() and could not find such option, any suggestion? Thanks, Derek [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Is DUD available in nls()?
a) Read the Posting Guide. It will tell you things like: 1) Don't post in HTML format. Adjust your email client appropriately. 2) Don't repost. Your emails are all there, looking silly next to each other. 3) Use the search facilities yourself, such as RSiteSearch(). b) Regarding your DUD algorithm, it doesn't sound familiar. There are many algorithms that don't use derivatives for optimization so it isn't clear that this is a referenceable label. The help file for nls mentions two algorithms that don't require derivatives. You might want to review the CRAN Task View on Optimization and Mathematical Programming if you want to know more about what is available in CRAN and base R. --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/BatteriesO.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --- Sent from my phone. Please excuse my brevity. qi A send2...@gmail.com wrote: SAS has DUD (Does not Use Derivatives)/Secant Method for nonlinear regression, does R offer this option for nonlinear regression? I have read the helpfile for nls() and could not find such option, any suggestion? Thanks, Derek [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code. __ 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 commented, minimal, self-contained, reproducible code.
Re: [R] Is DUD available in nls()?
I certainly second all Jeff's comments. **HOWEVER** : http://www.tandfonline.com/doi/pdf/10.1080/00401706.1978.10489610 IIRC, DUD's provenance is old, being originally a BMDP feature. -- Bert On Mon, Apr 1, 2013 at 10:59 AM, Jeff Newmiller jdnew...@dcn.davis.ca.uswrote: a) Read the Posting Guide. It will tell you things like: 1) Don't post in HTML format. Adjust your email client appropriately. 2) Don't repost. Your emails are all there, looking silly next to each other. 3) Use the search facilities yourself, such as RSiteSearch(). b) Regarding your DUD algorithm, it doesn't sound familiar. There are many algorithms that don't use derivatives for optimization so it isn't clear that this is a referenceable label. The help file for nls mentions two algorithms that don't require derivatives. You might want to review the CRAN Task View on Optimization and Mathematical Programming if you want to know more about what is available in CRAN and base R. --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/BatteriesO.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --- Sent from my phone. Please excuse my brevity. qi A send2...@gmail.com wrote: SAS has DUD (Does not Use Derivatives)/Secant Method for nonlinear regression, does R offer this option for nonlinear regression? I have read the helpfile for nls() and could not find such option, any suggestion? Thanks, Derek [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code. __ 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 commented, minimal, self-contained, reproducible code. -- Bert Gunter Genentech Nonclinical Biostatistics Internal Contact Info: Phone: 467-7374 Website: http://pharmadevelopment.roche.com/index/pdb/pdb-functional-groups/pdb-biostatistics/pdb-ncb-home.htm [[alternative HTML version deleted]] __ 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 commented, minimal, self-contained, reproducible code.