BookmarkSubscribeRSS Feed
BTAinRVA
Quartz | Level 8

Proc HPGENSELECT and the LASSO method are new to me and i wanted to see it in action with some real data. Unfortunately when I run the code below I the the error message above in the log but I get some output indicating that the intercept only model was selected as the best model.

 

proc hpgenselect data=SSD_DeIDd;

model SS_vis_ct= c_MH_status c_gender c_age p_age p_gender cumul_length_of_deploy /dist=nb link=log ;

selection method=Lasso(choose=SBC) details=all;

performance details;

run;

 

I did a google search and got nothing.

 

Thanks!

7 REPLIES 7
BTAinRVA
Quartz | Level 8

P.S. When I analyze the same data using Proc Genmod it finds all but one variable significant using either forward, backward, or stepwise methods.

Rick_SAS
SAS Super FREQ

It is very difficult to diagnose a "lack of convergence" issue when there is no data. However, the documentation for the LASSO selection option includes the statement

 

Some distributions involve a dispersion parameter (the parameter $\phi $ in the expressions for the log likelihood)..... These parameters are not estimated by the LASSO optimization algorithm, and are set to either the default value or a value that you specify. You can use the MODEL statement options PHI= to set the dispersion to a fixed value.

 

I don't know if it will help, but I'd try plugging in the value of the dispersion parameter from the GENMOD run.  Can't hurt, and you might get lucky.

BTAinRVA
Quartz | Level 8

Rick,

 

Thanks for the reply. I tried using the PHI option but got the same result, only the intercept model as the selected model and the error message as shown in the subject line.

 

Any ideas why the HPGENSELECT seems  to work with my data when I use selection method FORWARD, BACKWARD and STEPWISE, but it doesn't seem to work with LASSO?

 

Thanks again!

Rick_SAS
SAS Super FREQ

No, I can't guess based on what you've told us. LASSO performs a nonlinear optimization, so it could be any of a dozen reasons. The fact that other variable selection techniques converge isn't relevant or informative.

BTAinRVA
Quartz | Level 8

Thanks for the quick reply! What other information would be helpful?

Rick_SAS
SAS Super FREQ

The usual: The data and program that shows the problem.

BTAinRVA
Quartz | Level 8

Unfortunately I can't share the data. What we are trying to do is model count of child mental health visits  against cumulative parental deployment, child age, child gender, child mental health status, parent age, parent gender, parent rank. There are over 8800 records. When I run the code below with either Forward, Backward, or Stepwise method, all factors but one are selected for the final model. When I run the code with  the Lasso method I just get the intercept model and the error in the log.

 

 

proc hpgenselect data=SSD_DeIDd;

class adol_gender adol_MH_status spon_gender spon_rank;

model adol_SS_vis_ct= cumul_length_of_deploy adol_age adol_gender adol_MH_status spon_gender spon_age spon_rank / dist=nb link=log offset=ln_obs_time ;

selection method=forward (choose=SBC)details=all;

/* selection method=Lasso(choose=SBC) details=all;*/

run;

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 7 replies
  • 2093 views
  • 0 likes
  • 2 in conversation