On Mon, 5 Oct 2015, Allin Cottrell wrote:
I think BFGS ought to be able to do a decent job without that. Not
sure, but I think that rather than just truncating your parameters that are
supposed to be in the range 0 to 1, as in
> x = (x.<0)? 0 : x
> x = (x.>1)? 1: x
you might do better to use a transformation such as cnorm() which "naturally"
enforces the constraint. That is, let the x's be unconstrained but apply
weights of w[i] = cnorm(x[i]). (You'd then have to use critical(), the
inverse CDF function, to set the nth parameter such that the weights sum to
1.0. However, if the implied nth weight was negative, I guess you'd want your
function to return NA).
The problem with that approach is that you cannot have boundary values.
Numerical optimisation of function with inequality constraints is in fact
a very tricky and difficult task. AFAIK, most numerical methods in use
for this are variants of the so-called Sequential Quadratic Programming
approach. See for example here:
http://optimalisatie-project.googlecode.com/svn/trunk/actaSqp.pdf
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------