turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Find a Community

- Home
- /
- SAS Programming
- /
- SAS Procedures
- /
- PROC REG possible subsets of IVs

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

06-13-2011 10:24 AM

Multiple linear regression: Can SAS calculate 1024 different subsets from 14 IVs of which 4 are forced into the model? -

- I am trying to do a multiple regression analysis with 1 dependent variable (DV) and 14 independent variables (IVs).

I would like to let SAS calculate every possible subset of variables and select the final model based on the Akaike Information Criteria. I read that SAS can calculate every possible subset of variables for up to 10 IVs (i.e. 1024 subsets). Among my IVs are 4 confounders which I want to force into the model (from the beginning). This I can do with the option “/include=4”. If I now add 6 IVs (X5-X10) to the 4 confounders (X1-X4), SAS will calculate 64 (2 to the power of 6) different subsets (see my SAS code below). But if I add 7 IVs to the 4 confounders i get only 112 (instead of 128), if I add 8 I get 133 (instead of 256) and if I add 9 or 10 IVs I get 157 and 183 instead of 512 and 1024, respectively.

I would rather base my choice of the final model on more than 64 subsets. How does SAS get to the number of 183 subsets instead of 1024? Would it be statistically correct to choose the final model from the 183, should I limit myself to 64 or is there even a possibility to let SAS calculate all 1024 subsets?

Can SAS calculate 1024 different subsets from 14 IVs of which 4 are forced into the model?

proc reg data=BRI outest=EST;

model Y = X1 X2 X3 X4 /* 4 confounders + 6 = 10 IVs */

X5 X6 X7 X8 X9 X10

/ include=4 selection=adjrsq aic sbc;

run; quit;

Thank you very much for your time.

- I am trying to do a multiple regression analysis with 1 dependent variable (DV) and 14 independent variables (IVs).

I would like to let SAS calculate every possible subset of variables and select the final model based on the Akaike Information Criteria. I read that SAS can calculate every possible subset of variables for up to 10 IVs (i.e. 1024 subsets). Among my IVs are 4 confounders which I want to force into the model (from the beginning). This I can do with the option “/include=4”. If I now add 6 IVs (X5-X10) to the 4 confounders (X1-X4), SAS will calculate 64 (2 to the power of 6) different subsets (see my SAS code below). But if I add 7 IVs to the 4 confounders i get only 112 (instead of 128), if I add 8 I get 133 (instead of 256) and if I add 9 or 10 IVs I get 157 and 183 instead of 512 and 1024, respectively.

I would rather base my choice of the final model on more than 64 subsets. How does SAS get to the number of 183 subsets instead of 1024? Would it be statistically correct to choose the final model from the 183, should I limit myself to 64 or is there even a possibility to let SAS calculate all 1024 subsets?

Can SAS calculate 1024 different subsets from 14 IVs of which 4 are forced into the model?

proc reg data=BRI outest=EST;

model Y = X1 X2 X3 X4 /* 4 confounders + 6 = 10 IVs */

X5 X6 X7 X8 X9 X10

/ include=4 selection=adjrsq aic sbc;

run; quit;

Thank you very much for your time.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

Posted in reply to FriedrichW

06-13-2011 11:20 AM

I think best option is what you need.

[pre]

data reg;

array v y x1-x14;

do i = 1 to 100;

do j = 1 to dim(v);

v=ranuni(1234);

end;

output;

end;

run;

proc reg outest=est;

model Y = X1-X4 /* 4 confounders */

X5-x14

/ include=4 best=1024 selection=adjrsq aic sbc;

run;

quit;

proc print n;

run;

[/pre]

[pre]

data reg;

array v

do i = 1 to 100;

do j = 1 to dim(v);

v

end;

output;

end;

run;

proc reg outest=est;

model Y = X1-X4 /* 4 confounders */

X5-x14

/ include=4 best=1024 selection=adjrsq aic sbc;

run;

quit;

proc print n;

run;

[/pre]