DATA Step, Macro, Functions and more

Regression ODS tables without printing

Accepted Solution Solved
Reply
Super Contributor
Posts: 441
Accepted Solution

Regression ODS tables without printing

Hi,

 

I am doing the following regressions:

 

ods graphics off;
ods output parameterestimates = parms;
ods output anova = an;
ods output FitStatistics = fitstats;
proc reg data=sashelp.cars;
m1: model Invoice = EngineSize Cylinders;
m2: model invoice = Horsepower MPG_City Weight;
run;
ods graphics on;

I am getting the regression results in the 3 tables, but I am also getting the results printed on the Results Viewer.

When I include the NOPRINT option the ODS doesn't output the tables. Is it possibe somehow to have the ODS tables and not having the results printed? The reason is that I am doing dozens of regressions for different models.

 

Thank you


Accepted Solutions
Solution
‎09-05-2017 07:50 PM
SAS Super FREQ
Posts: 3,753

Re: Regression ODS tables without printing

Yes, you can turn off the RESULTS (the "treeview control") by using

ODS NORESULTS

and then run the procedure. You can turn it back on with 

ODS RESULTS

 

Please DO NOT use ODS CLOSE _ALL_. Instead use 

ODS EXCLUDE ALL;

They are not the same, and ODS EXCLUDE is easier to use.

 

You can read all about how to suppress printed output while using ODS OUTPUT to save results in the article

"Turn off ODS when running simulations in SAS"

 

View solution in original post


All Replies
Super User
Super User
Posts: 7,970

Re: Regression ODS tables without printing

You can set each destination on/off as you want, for instance:

ods listing close;

 

Or you can turn off all ods dedstinations with:

ods _all_ close;

 

Then you can turn them back on as needed.

Super Contributor
Posts: 441

Re: Regression ODS tables without printing

Hi RW9,

 

Thank you for the code. I ran it and obtained the 3 tables in the Explorer window without printing, just like I wanted.

 

I have a small question: In the Results window, I see the branching of each model, which leads to the same 3 tables, so I have the 3 tables multiplied by the number of models. I just want to make sure that when I run dozens of regressions this branching process doesn't take too much memory and as a result crushes my calculations.

 

Thanks!  

Super User
Super User
Posts: 7,970

Re: Regression ODS tables without printing

I think thats more of a stats specific question relating to your model, as the models run seqeuntialy (I presume), they should only need the maximum needed for each run at any one point, so if your model runs fine in each case on its own it should be fine overall - unless you runout of disk space.  But thats just guessing, you will have to try it.

Solution
‎09-05-2017 07:50 PM
SAS Super FREQ
Posts: 3,753

Re: Regression ODS tables without printing

Yes, you can turn off the RESULTS (the "treeview control") by using

ODS NORESULTS

and then run the procedure. You can turn it back on with 

ODS RESULTS

 

Please DO NOT use ODS CLOSE _ALL_. Instead use 

ODS EXCLUDE ALL;

They are not the same, and ODS EXCLUDE is easier to use.

 

You can read all about how to suppress printed output while using ODS OUTPUT to save results in the article

"Turn off ODS when running simulations in SAS"

 

Super Contributor
Posts: 441

Re: Regression ODS tables without printing

Thanks Rick for the advice!

 

But how do I undo  ODS EXCLUDE ALL; like this again I can ahve the printed results?

SAS Super FREQ
Posts: 3,753

Re: Regression ODS tables without printing

That information (and more!) is in the links that I provided.

☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 6 replies
  • 162 views
  • 3 likes
  • 3 in conversation