Question

I need help with proc reg in sas. Currently I'm using the following code:

proc reg data=input outest=data_output;
model y = x1-x25 / selection = cp;
run;
quit;

I wonder how to set maximum limit of number of regressors that enter my model. Now as you can see I want SAS to test 25 variables, but also I want it to select no more than 7 variables in my model.

And one more questions, does anybody now why SAS outputs only 601 model combinations when I use the procedure above? Why doesn't it show all possible models that it can create with this 25 regressors?

Any comments and help will be appreciated!

Was it helpful?

Solution

Use the STOP= option in the model statement.

proc reg data=input outest=data_output;
model y = x1-x25 / selection = cp stop=7;
run;
quit;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top