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

Hi All - relatively new SAS user here.

 

I have a macro that uses a do loop to iterate the ARIMA procedure, making certain adjustments on each iteration based on the results of the proc's outlier detection feature. With each iteration, the macro prints only the outlier detection summary and details, suppressing all the other tables and plots. This is achieved by using "noprint" on the "identify" and "estimate" statements:

 

proc arima data=MyData;
	identify var=indpro(1) noprint;
	estimate p=1 q=2 method=ML noprint;
	outlier maxnum=30 alpha=0.005;
run;

This works well, however I would also like to include a plot of the white noise probabilities in the output of each iteration. This is one of the standard plots produced by the ARIMA procedure, and I can isolate the plot in the output by specifying "plots(only)=residual(WN)":

 

proc arima data=MyData plots(only)=residual(WN);
	identify var=indpro(1) noprint;
	estimate p=1 q=2 method=ML;
	outlier maxnum=30 alpha=0.005;
run;

The problem with this is that it will only show the plot in question if I remove the "noprint" statement from the "estimate" line. Once I do so, the plot is included in the output as desired, however all the other standard tables produced by the estimate statement are also printed, which I do not want.

 

Is there a way to isolate the white noise plot and print it in the output without all the other standard tables produced by the estimate statement? I ran ods trace to identify the name of the specific plot I'm looking for, in case that helps:

 

Name: ResidualWNPlot
Label: Residual White Noise Plot
Template: ets.arima.Graphics.WNPlot
Path: Arima.Estimate.ResidualWNPlot

 

Any suggestions would be appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
Cynthia_sas
SAS Super FREQ
Hi:
Instead of using the NOPRINT option, investigate the use of ODS SELECT to select only the output objects you want. Here's a paper that discusses the use of ODS TRACE first to find out the names of the objects (which you already seem to have found) and then ODS SELECT to select only the objects you want to output. Then the others will be internally created, but not sent forward to the destination.
cynthia

http://support.sas.com/resources/papers/proceedings13/039-2013.pdf
http://analytics.ncsu.edu/sesug/2009/RV003.Reich.pdf
http://www.lexjansen.com/nesug/nesug12/cc/cc03.pdf

View solution in original post

2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
Instead of using the NOPRINT option, investigate the use of ODS SELECT to select only the output objects you want. Here's a paper that discusses the use of ODS TRACE first to find out the names of the objects (which you already seem to have found) and then ODS SELECT to select only the objects you want to output. Then the others will be internally created, but not sent forward to the destination.
cynthia

http://support.sas.com/resources/papers/proceedings13/039-2013.pdf
http://analytics.ncsu.edu/sesug/2009/RV003.Reich.pdf
http://www.lexjansen.com/nesug/nesug12/cc/cc03.pdf
Aaron_01
Calcite | Level 5

Perfect. ODS SELECT was exactly what I needed. Thanks Cynthia!

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!

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
  • 2 replies
  • 1036 views
  • 2 likes
  • 2 in conversation