I need to optimize a multivariate function f(w, x, y, z, ...) under an absolute value constraint. For instance: min { (2x+y) (w-z) } under the constraint: |w| + |x| + |y| + |z| = 1.0 . Is there any R function that does this? Thank you for your help! Phil Xiang
this should be possible in the lasso2 package. url: www.econ.uiuc.edu/~roger Roger Koenker email rkoenker at uiuc.edu Department of Economics vox: 217-333-4558 University of Illinois fax: 217-244-6678 Champaign, IL 61820 On Sep 7, 2007, at 1:17 PM, Phil Xiang wrote:> I need to optimize a multivariate function f(w, x, y, z, ...) under > an absolute value constraint. For instance: > > min { (2x+y) (w-z) } > > under the constraint: > > |w| + |x| + |y| + |z| = 1.0 . > > Is there any R function that does this? Thank you for your help! > > > Phil Xiang > > ______________________________________________ > R-help at 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 > and provide commented, minimal, self-contained, reproducible code.
On 9/7/07, Phil Xiang <pxxiang at yahoo.com> wrote:> I need to optimize a multivariate function f(w, x, y, z, ...) under an absolute value constraint. For instance: > > min { (2x+y) (w-z) } > > under the constraint: > > |w| + |x| + |y| + |z| = 1.0 . > > Is there any R function that does this? Thank you for your help!I think that the minimum value of the function f(x) := -2*x*(1-x), with 0 <= x <= 1 is also the minimum value of the objective function of your problem (but correct me if I am wrong). Thus, x y w z -0.5 0 0 -0.5 -0.5 0 0.1 -0.4 -0.5 0 0.3 -0.2 0.5 0 -0.5 0 -0.5 0 0.5 0 0.5 0 -0.4 0.1 0.5 0 -0.2 0.3 0.5 0 0 0.5 are all solutions for your problem. Paul