BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ilikesas
Barite | Level 11

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

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

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

6 REPLIES 6
RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

ilikesas
Barite | Level 11

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!  

RW9
Diamond | Level 26 RW9
Diamond | Level 26

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.

Rick_SAS
SAS Super FREQ

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"

 

ilikesas
Barite | Level 11

Thanks Rick for the advice!

 

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

Rick_SAS
SAS Super FREQ

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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