Re: [R] Constrained optimization

About this list Date view Thread view Subject view Author view Attachment view

From: Martin Maechler (maechler@stat.math.ethz.ch)
Date: Tue 17 Jun 2003 - 17:42:04 EST


Message-id: <16110.50764.604685.473921@gargle.gargle.HOWL>


>>>>> "FCharles" == Charles Annis, P E <Charles.Annis@statisticalengineering.com>
>>>>> on Mon, 16 Jun 2003 13:19:50 -0400 writes:

    FCharles> Greetings, R-Wizards: I'm trying to find an
    FCharles> extremum subject to a nonlinear constraint. (Yes,
    FCharles> I have perused the archives but have found nothing
    FCharles> positive.) The details of the problem are these:

    FCharles> In a paper published some years ago in
    FCharles> Technometrics, ("Confidence bands for cumulative
    FCharles> distribution functions of continuous random
    FCharles> variables" Technometrics, 25, 77-86. 1983), Cheng
    FCharles> and Iles describe an ingenious method for placing
    FCharles> confidence bounds on an entire cdf by defining the
    FCharles> likelihood ratio confidence "ellipse" for the
    FCharles> model parameters, and then traversing the
    FCharles> periphery and finding the most extreme values for
    FCharles> x, at a given F(x), such that the distribution
    FCharles> parameters reside on that confidence contour.
    FCharles> (Well, their method is more sophisticated than
    FCharles> that, but that's essentially how it works.) I
    FCharles> implemented the thing in a spreadsheet 15 years
    FCharles> ago, and would like to do the same in R. But
    FCharles> EXCEL's solver can find an extremum subject to a
    FCharles> constraint, and I haven't figured out how to get
    FCharles> nlm() to do that.

    FCharles> I would be grateful for any algorithmic
    FCharles> suggestions.

I'm astonished that your perusing of the archives and the
on-line help system didn't find
        optim().

It has many methods, one of which working with box constraints.
I'm urging you to read help(optim) {and please read to the end
even if it's long}.

If you have non-box constraints, there are other tricks
(eg. continuous border penalizing) but it really depends on
your application.

Martin Maechler <maechler@stat.math.ethz.ch> http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum LEO C16 Leonhardstr. 27
ETH (Federal Inst. Technology) 8092 Zurich SWITZERLAND
phone: x-41-1-632-3408 fax: ...-1228 <><

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help


About this list Date view Thread view Subject view Author view Attachment view

This archive was generated by hypermail 2.1.3 : Tue 01 Jul 2003 - 09:11:54 EST