Programming the statistical procedures from SAS

getting the selection details lambda fit statistic in proc glmselect

Reply
Contributor
Posts: 51

getting the selection details lambda fit statistic in proc glmselect

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.

Super User
Posts: 23,683

Re: getting the selection details lambda fit statistic in proc glmselect

Contributor
Posts: 51

Re: getting the selection details lambda fit statistic in proc glmselect

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?

 

 

Super User
Posts: 23,683

Re: getting the selection details lambda fit statistic in proc glmselect

Whats your version of SAS/STAT?

 

proc product_status;run;
Contributor
Posts: 51

Re: getting the selection details lambda fit statistic in proc glmselect

the version is: 9.4_M4

Super User
Posts: 23,683

Re: getting the selection details lambda fit statistic in proc glmselect

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

Contributor
Posts: 51

Re: getting the selection details lambda fit statistic in proc glmselect

stat version: 14.2

Super User
Posts: 23,683

Re: getting the selection details lambda fit statistic in proc glmselect

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;

 

 

Contributor
Posts: 51

Re: getting the selection details lambda fit statistic in proc glmselect

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.

Super User
Posts: 23,683

Re: getting the selection details lambda fit statistic in proc glmselect

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.

Contributor
Posts: 51

Re: getting the selection details lambda fit statistic in proc glmselect

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

 

 

SAS Super FREQ
Posts: 4,239

Re: getting the selection details lambda fit statistic in proc glmselect

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);

 

 

Contributor
Posts: 51

Re: getting the selection details lambda fit statistic in proc glmselect

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!

SAS Super FREQ
Posts: 4,239

Re: getting the selection details lambda fit statistic in proc glmselect

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.

Ask a Question
Discussion stats
  • 13 replies
  • 252 views
  • 6 likes
  • 3 in conversation