Skip to content

lr with positive coeffs

3 messages · Sandor Lehoczky, Brian Ripley, Adam Gehr

#
Is there any way in R to do a linear regression with positive
coefficients only?

Thanks for any help!

Sandor Lehoczky
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
On Fri, 12 Oct 2001, Sandor Lehoczky wrote:

            
Yes. There is an example in the MASS scripts ch09.R.
You could also use package quadprog.
#
I've used the quadratic programming (quadprog) routine to
run a constrained
regression routine including non-negativity constraints.

   Adam Gehr
Sandor Lehoczky wrote:
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._