[R] optimizing with non-linear constraints
Rainer M Krug
Rainer at krugs.de
Wed Sep 30 10:46:59 CEST 2015
I have posted the following question on stackoverflow  but haven't
received a response yet. Has somebody here any idea, how to formulate
non-linear constraints using e.g. the packages alabama or nlopr? The
question is pasted below.
I am really stuck with this.
| I am successful in using constrOptim() for linear constraints (thanks to
| a comment in my earlier question), but I now have a problem with
| non-linear constraints.
| Consider the following example:
| I want to fit a function FUN(X1, X2, ... X12)
| X1 = dep.a
| X2 = dep.b
| X3 = dep.c
| ... for all z0. , na. and zjoint.
| and have the following constraint
| (link to formulas:
| With some re-formating and h > 0 and LAI > 0 I get for thew first one
| -X1 <= LAI^X2 / X3 < 1 - X1
| where LAI is simply a number which constant for each fit.
| I saw the packages alabama and nloptr but I don't manage to get my head
| around how I can specify these types of constraints?
| Also a web search did not yield any helpful information for me.
| Could somebody provide some info how I can convert these constraints
| into arguments for the fitting functions (e.g. hin, heq in the alabama
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Tel : +33 - (0)9 53 10 27 44
Cell: +33 - (0)6 85 62 59 98
Fax : +33 - (0)9 58 10 27 44
Fax (D): +49 - (0)3 21 21 25 22 44
email: Rainer at krugs.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 454 bytes
Desc: not available
More information about the R-help