BookmarkSubscribeRSS Feed
momi
Obsidian | Level 7

Hi,

 

I am trying to suppress otuputs that prints out from PROC SURVERREG.  I tried "NOPRINT" option but it did not work. 

 

proc surveyreg data    = dataset  noprint ;
                      
Does anyone know where I should put the option in PROC SURVEYREG?

 

Thank you,

 

Momi                 

 

 

5 REPLIES 5
ballardw
Super User

You will need to know either which output tables you want and use and ODS Select statement or which ones to suppress and use ODS Exclude.

 

The documentation for surveyreg will list all of the table or you can use ODS trace on; before the proc and then close with ODS trace off afterwards. Then you will get a listig of the tables generated.

 

Without specific code for options used and which ones you want to see it is hard to provide more explicit response.

Note that if you are using ODS Output to create output data sets then suppressing them with ods exclude / select will mean the table is not there to create data.

momi
Obsidian | Level 7

Thank you for your response.  So, this does not work since I am creating ods tables, correct?

 


      ods output ParameterEstimates = test  (keep = parameter StdErr probt estimate);

         proc surveyreg data    = dataset norpint ;

 

 

 

so, is there anyway to have ODS outputs and suppressed paramaters output in the list file?

 

Thanks!

ballardw
Super User

You would need to ensure that the ParameterEstimates output is created.

That would be the ODS Select to only generate that table.

 

I don't think SAS has implemented an OUTPUT statement based output data set for parameter estimates or most of the other items outside of predicted values and the associated confidence limits, resduals and standard errors.

MelissaM
Obsidian | Level 7

To the programmers: It would be a useful enhancement to have a NOPRINT option available in PROC SURVEYREG. In many cases, I just need the ODS OUTPUT data sets, which I manipulate. I'm sure it would save some computational time. 

Rick_SAS
SAS Super FREQ

You want to put

ODS EXCLUDE ALL;

before the call and 

ODS EXCLUDE NONE;

after the call.

To understand why that is the preferred approach, see "What is the best way to suppress ODS output in SAS?"

 

To create a data set that contains any statistic in any table, use ODS OUTPUT NameOfTable=DSName before the call, as explained in "ODS OUTPUT: Store any statistic created by any SAS procedure"

 

Thus your code will look like this:

ODS EXCLUDE ALL;
ods output ParameterEstimates=test(keep=parameter StdErr probt estimate);
proc surveyreg data    = dataset;
    more statemens;
run;
ODS EXCLUDE NONE;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 5 replies
  • 2829 views
  • 3 likes
  • 4 in conversation