Building models with SAS Enterprise Miner, SAS Factory Miner, SAS Visual Data Mining and Machine Learning or just with programming

Script to run Stepwise in a loop

New Contributor
Posts: 4

Script to run Stepwise in a loop


I need to run a stepwise model for a several Y (Pole Variables), while my model effects are the same for each Y.  I need to get the stepwise fit tables for each Y, and run 7-8 steps for each Y.  Then I need to run models, get Parameter Estimates for each Y and extract all resulting tables into one combined table.

It would be great if I could get the first part as a script (stepwise fit tables for each Y) for a start.


Super Contributor
Posts: 337

Re: Script to run Stepwise in a loop

Hi Achufa,

This is a good start for the SAS macro you need. Give it a try.

Happy to help if you have questions.


Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation