[R] Which package/function for solving weighted linear least squares with inequality and equality constraints?

Berend Hasselman bhh at xs4all.nl
Fri Oct 19 20:12:12 CEST 2012

On 19-10-2012, at 20:00, Thomas Schu wrote:

> Dear All,
> Which package/function could i use to solve following linear least square
> problem?
> A over determined system of linear equations is given. The nnls-function may
> would be a possibility  BUT:
> The solving is constrained with 
> a inequality that all unknowns are >= 0 
> and a equality that the sum of all unknowns is 1
> The influence of the equations according to the solving process is weighted
> too.
> llAx-bll2 * weight
> with xi >=0 and sum(x)=1
> I´m pleased about every suggestion.

Just guessing.

Go to the Optimization task view on the Task Views page on  CRAN: http://cran.r-project.org/web/views/

Have a look at package limSolve (Quadratic Programming). From the description I gather that it may do what you want.


More information about the R-help mailing list