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-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


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