BookmarkSubscribeRSS Feed
Jest
Obsidian | Level 7

HI, 

 

I am trying to get the selection details in glmselect, specifically the lambda fit statistic. I noticed that the following link generates the selection details that has the lambda for hpgenselect:

http://support.sas.com/documentation/cdl/en/stathpug/68163/HTML/default/viewer.htm#stathpug_hpgensel...

 

any way I can get the same table in proc glmselect? 

This is my code:

 

proc glmselect data=data plots(stepaxis=normb)=all;
model converted= x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15/selection=lasso (choose=sbc) details=all; performance details; run;

 

This gives me the RootMSE, dependent mean, R-square, Adj R-sq, AIC, AICC, SBC...but not the lambda.

 

Thanks.

14 REPLIES 14
Jest
Obsidian | Level 7

Thanks. but the issue is not with storing the statistcs, but with generating the lambda values in the output, every other statistic fit is generated. Does sas not generate lambda statistic fit using glmselect?

 

 

Reeza
Super User

Whats your version of SAS/STAT?

 

proc product_status;run;
Jest
Obsidian | Level 7

the version is: 9.4_M4

Reeza
Super User

That's your SAS version, not STAT version. Please run the code shown and post the STAT version.

Reeza
Super User

Post your log please, the code doesn't look correct. 

Selection should be a new line like in the demo.

 

Yours:

model converted= x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15/selection=lasso (choose=sbc) details=all; performance details;

run;

 

SAS Sample:

model yPoisson = x: / dist=Poisson;
selection method=Lasso(choose=SBC) details=all;

 

 

Jest
Obsidian | Level 7

that is because that is the code for hpgenselect..I am trying to get the lambda for glmselect which is different than the demo. with glmselect the option is following a / and not with a new line...I am trying to get the lambda for glmselect. 

 

Thanks.

Reeza
Super User

That is what you said, my bad, I missed the difference there. Unfortunately I'm not seeing one, but hopefully someone else knows a way go get it.

Jest
Obsidian | Level 7

thanks! yeah. I hope someone can help with finding a way.

 

 

Rick_SAS
SAS Super FREQ

The GLMSELECT procedure uses the keyword 'L1' instead of 'lambda' .See the GLMSELECT documentation for various ways to search/stop in the parameter space. The L1 option is only available for the group lasso, and the syntax looks something like this:

 

model y = x1-x100 / selection=GROUPLASSO(stop=L1 L1=0.1 showStepL1);

 

 

Jest
Obsidian | Level 7

Thank you Rick! I never replied that this actually worked. Quick question, what is a good L1 value to set it as in your option.

 

Thanks!

Rick_SAS
SAS Super FREQ

I don't know. It depends somewhat on the value of the L1CHOICE option. I think "a small value" is what I usually see, similar to ridge parameters. But I don't have any advice as to whether 0.1 is "usually better" than 0.01. I suggest you experiment, possibly on simulated data or which you know the true underlying model.

cHirap
Calcite | Level 5

I am new to SAS. I am trying to understand LASSO in SAS and glmselect. Can someone hlep mewith some of the my questions here? Thank you. eWhen we do glmselect , is it that SAS choses the value of lambda by its own? If so, how can I get the value of lambda it chose? In one of the post s here you say that you got the value for lambda. Can you share the code? Did you use it for LASSO or group LASSO?

2.One of the posts here says we have to use L1 keyword to set LASSO value. in group LASSO. So is that we can set the value of LASSO only when we use tGROOUP LASSO and not LASSO?

3. After reading the post here I am trying to understand tthe differnce between LASSO and Group LASSO. Can you explain the difference in simple terms?

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 14 replies
  • 2782 views
  • 6 likes
  • 4 in conversation