Re: [R] constraints

From: Arne Henningsen <ahenningsen_at_agric-econ.uni-kiel.de>
Date: Mon 23 May 2005 - 06:46:34 EST

On Sunday 22 May 2005 21:32, you wrote:
> Hi Arne,
> Thanks. Unfortunately constrOptim does not handle combined equality and
> inequality constraints, or perhaps not in a way that I understand. Do you
> have suggestions as to how to handle such combinations of constraints?
> best, ingmar

You can impose the equality constraints directly by parameter substitution. See

   https://stat.ethz.ch/pipermail/r-help/2005-May/070481.html and the 3 answers.
Then you can impose the inequality constraints in constrOptim. I don't know if it possible to impose an equality constraint, say a = b, in constrOptim by two inequality constraints:

   a - b >= 0
and

   b - a >= 0
However, I guess that the solver prefers the first way ;-)

Best wishes,
Arne

> On 5/22/05 3:28 PM, "Arne Henningsen" <ahenningsen@agric-econ.uni-kiel.de>
>
> wrote:
> > On Sunday 22 May 2005 03:18, Ingmar Visser wrote:
> >> Is there a package in R that handles general linear (in-)equality + box
> >> constrained optimization?
> >
> > R> help.search("constrained optimisation")
> > constrOptim(stats) Linearly constrained optimisation
> >
> > Best wishes,
> > Arne
> >
> >> If it is not there, could anyone advise me which way to go?
> >> And/or point me to packages that solve these problems partially?
> >> best, ingmar

-- 
Arne Henningsen
Department of Agricultural Economics
University of Kiel
Olshausenstr. 40
D-24098 Kiel (Germany)
Tel: +49-431-880 4445
Fax: +49-431-880 1397
ahenningsen@agric-econ.uni-kiel.de
http://www.uni-kiel.de/agrarpol/ahenningsen/

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Mon May 23 06:50:43 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:32:00 EST