# Non negative lasso implementation in R

I am looking for some open source or an existing library I can use. As far as I tell the glmnet package isn't very easily extensible to cover the non negative case. I may be wrong, Any one with any ideas much appreciated.

By non-negative I mean that all coefficients are constrained to be positive (> 0).

-
Pardon me for asking, but what exactly do you mean with non-negative lasso? To keep all coefficients > 0 or only allow positive predictions? Googling didn't enlighten me but it sounds like something I'd like to know about. –  Backlin Oct 8 '12 at 7:28
Sorry for closing your question, but it is better asked and answered at www.crossvalidated.com I flagged the question for migration, so the mods will take care of it shortly. This said, please make your question clear and explain exactly what you want. The lasso expert in our research group couldn't possibly figure out what you were aiming at... –  Joris Meys Oct 8 '12 at 8:48
Sorry about that. Non negative means all coefficients are positive. I tried using the package glmnet but that only solves for the general case. –  ganesh reddy Oct 16 '12 at 14:24

## migrated from stackoverflow.comOct 8 '12 at 13:55

This question came from our site for professional and enthusiast programmers.

See the penalized package for one option. The Vignette (PDF!) that comes with the package has an example of this in section 3.9.

Essentially set argument positive = TRUE in the call to the penalized() function.

-