Is DUD available in nls()?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Is DUD available in nls()?

qi A
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]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Is DUD available in nls()?

Jeff Newmiller
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 Newmiller                        The     .....       .....  Go Live...
DCN:<[hidden email]>        Basics: ##.#.       ##.#.  Live Go...
                                      Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
/Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.

qi A <[hidden email]> 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]]
>
>______________________________________________
>[hidden email] 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.

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Is DUD available in nls()?

Bert Gunter
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 <[hidden email]>wrote:

> 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 Newmiller                        The     .....       .....  Go Live...
> DCN:<[hidden email]>        Basics: ##.#.       ##.#.  Live
> Go...
>                                       Live:   OO#.. Dead: OO#..  Playing
> Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
> /Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
> ---------------------------------------------------------------------------
> Sent from my phone. Please excuse my brevity.
>
> qi A <[hidden email]> 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]]
> >
> >______________________________________________
> >[hidden email] 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.
>
> ______________________________________________
> [hidden email] 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]]

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Is DUD available in nls()?

bbolker
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

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Is DUD available in nls()?

Hans W Borchers
In reply to this post by Bert Gunter
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
>

______________________________________________
[hidden email] 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.
Reply | Threaded
Open this post in threaded view
|

Re: Is DUD available in nls()?

Prof J C Nash (U30A)
In reply to this post by qi A
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 +0000
From: Ben Bolker <[hidden email]>
To: <[hidden email]>
Subject: Re: [R] Is DUD available in nls()?
Message-ID: <[hidden email]>
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

______________________________________________
[hidden email] 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.