[R] constrOptim does ineq, not eq, but who do ?

Ricardo Zorzetto Nicoliello Vencio rvencio at ime.usp.br
Tue Apr 27 13:59:22 CEST 2004


Hi everybody,

please, could you give me help ? I scanned the help archives and didn't
found hints...

I want to solve a large sparse linear system subjected to an inequality
constrains (all solutions positive) and an equality constrain (all
solutions sum to 1), thus I tried to fool constrOptim using:

 x[1] +   0  + ... +  0   >= 0
...
   0  +   0  + ... + x[n] >= 0
 x[1] + x[2] + ... + x[n] >= 1
-x[1] - x[2] - ... - x[n] >= -1

in minimization: min( dist(A*x - b) )

But, since the initial guess x0 must be in the fasiable region and NOT in
the boundaries (due to trick I only have boundary), this trick doens't
work out.

If constrOptim doesn't make subject to equalities, what function could do
this optimization ? any ideia ?

I look for something similar to MATLAB's lsqlin function:
http://web.media.mit.edu/~bill/workspace/matlab/toolbox/optim/lsqlin.html




More information about the R-help mailing list