BookmarkSubscribeRSS Feed
jallaire
Calcite | Level 5

I use the PROC HPGENSELECT with the STEPWISE selection method as following (SAS 9.4): 

 

PROC HPGENSELECT data=kin.nogeneticmut ;

CLASS sex gal_cinetique;

model ldlsi = age sex bmi PR_VLDL_B100 lFCR_VLDL_B100 lPR_IDL_B100  lFCR_IDL_B100

      lPR_LDL_B100 lFCR_LDL_B100 ltg gal_cinetique  /  distribution=normal link=id;

selection method=stepwise details = all  ;

 

RUN;

 

I would like to:
- Get the adjusted rsquare of the final model (ss2 option in the model statement in proc reg -> total and individual rsquare for each X values);

- Get the standardized estimates (stb option in the model statement in proc reg). 

 

I have tried the NOCENTER option as follow to get the standardized estimates: 

 

PROC HPGENSELECT data=kin.nogeneticmut ;

CLASS sex gal_cinetique;

model ldlsi = age sex bmi PR_VLDL_B100 lFCR_VLDL_B100 lPR_IDL_B100  lFCR_IDL_B100

      lPR_LDL_B100 lFCR_LDL_B100 ltg gal_cinetique  /  distribution=normal link=id NOCENTER;

selection method=stepwise details = all  ;

RUN;

 

but it doesn't work. 

 

May you help me?

1 REPLY 1
Rick_SAS
SAS Super FREQ

Because you are using DIST=NORMAL and LINK=ID, you can actually use PROC GLMSELECT to solve this problem (probably faster and provides more statistics).

 

At any rate, the answer to your question is that the HPGENSELECT procedure (and GLMSELECT, too) creates a macro variable that contains the names of the variables that are selected in the final model. You can reference the macro variable on the MODEL statement of other procedures (GLM, GENMOD,....) to obtain statistics for the final model. 

 

If your model includes CLASS variables, you can't use PROC REG unless you also generate the design matrix. See the last example in the article.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1 reply
  • 566 views
  • 1 like
  • 2 in conversation