Help using Base SAS procedures

PROC REG possible subsets of IVs

Reply
N/A
Posts: 1

PROC REG possible subsets of IVs

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.
Respected Advisor
Posts: 3,799

Re: PROC REG possible subsets of IVs

Posted in reply to FriedrichW
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]
  • Ask a Question
    Discussion stats
    • 1 reply
    • 189 views
    • 0 likes
    • 2 in conversation