- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi ,
Please tell me how to put a non-negative constraint on the regression coefficient in Lasso regression.
I use ETS or STAT.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You can use HPGENSELECT to fit your model using the LASSO method in the SELECTION statement. It also has a RESTRICT statement that can be used to restrict parameters in the model. Unfortunately, model selection methods cannot be used together with parameter restrictions. However, after selecting a model, you can try refitting it by adding one or more RESTRICT statements to restrict parameters. For example, the following restricts the X4 parameter to be positive.
proc hpgenselect;
model y=x1 x2 x3 x4;
restrict x4 1 > 0;
run;
- Tags:
- restrict
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Here is a Japanese community, so you may find it easier to get answers if you post here.
https://communities.sas.com/t5/SAS-Programming/bd-p/programming
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You can use HPGENSELECT to fit your model using the LASSO method in the SELECTION statement. It also has a RESTRICT statement that can be used to restrict parameters in the model. Unfortunately, model selection methods cannot be used together with parameter restrictions. However, after selecting a model, you can try refitting it by adding one or more RESTRICT statements to restrict parameters. For example, the following restricts the X4 parameter to be positive.
proc hpgenselect;
model y=x1 x2 x3 x4;
restrict x4 1 > 0;
run;
- Tags:
- restrict
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you.