1

I'm running in loop stepwize regression (PROC REG) for several thousand of dependent variables using about 50 independent variables.

I need to create report showing partial R-squared for every independent variable vs. each dependent variable.

It would be relatively easy task if I could output "Summary of Stepwise Selection" table from SAS PROC REG into data set.

I cannot find a way to do it.

Please help.

Thanks

  • 1
    Put `ods trace on;` before a (single) run of `proc reg`. Then look at the log - is there any output that looks like it's that summary? – Joe Jun 15 '15 at 17:01
  • 1
    Joe's suggestion is deadon. Beside his suggestion, you can also just do a google 'ods table names proc reg' to identify the table name of your interest. – Haikuo Bian Jun 15 '15 at 17:28

1 Answers1

2

You can use the ODS to put that into a table.

try this:

ods output SelectionSummary=SelectionSummary;

proc reg data=test plots=none;
model y = a b c / selection=backward;
run;
quit;

This will output that table to WORK.SelectionSummary. You can look at the PROC REG documentation in the "ODS Table Names" section to see what tables are available to output.

DomPazz
  • 12,415
  • 17
  • 23