BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
wutao9999
Obsidian | Level 7

reg data = clean_data

outest = data_a;

model volume = price factor1 factor2 factor3/selection = stepwise;
output out=model_res  ;

quit;

I have the above regression model using stepwise selection method. In the model, I want to keep price as a regressor (or explanatory variable) no matter how it is related to volume.

How can I force the price as a regressor as the stepwise step won't remove it?  Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Use the INCLUDE option with n=1.

INCLUDE=n

forces the first n independent variables listed in the MODEL statement to be included in all models. The selection methods are performed on the other variables in the MODEL statement. The INCLUDE= option is not available with SELECTION=NONE.

SAS/STAT(R) 9.2 User's Guide, Second Edition

View solution in original post

1 REPLY 1
Reeza
Super User

Use the INCLUDE option with n=1.

INCLUDE=n

forces the first n independent variables listed in the MODEL statement to be included in all models. The selection methods are performed on the other variables in the MODEL statement. The INCLUDE= option is not available with SELECTION=NONE.

SAS/STAT(R) 9.2 User's Guide, Second Edition

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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