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-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 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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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