SAS Programming

DATA Step, Macro, Functions and more
BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
harmonic
Quartz | Level 8

Hello Community,

 

I am dealing with Proc ARIMA for outliers detection, I would like to output the dataset with the outliers dates by a variable:


/*-- Outlier Detection --*/
proc arima data=CASUSER.ds out=ds_outliers;
  	identify var=dk  noprint;
	by region;
	estimate method=ml;
	outlier id=date;
run;


This is the output for a single region, I would like to flag the outliers in my original dataset. I checked and with out= option the is just statistics of the model.

harmonic_0-1717422648877.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

Any SAS output (like the output table) can be output to a data set via ODS OUTPUT, you can see all the table names for PROC ARIMA here (and similarly for any PROC by looking for Details/Table Names) and you want the table OUTLIERDETAILS

 

So you want 

 

proc arima data=CASUSER.ds out=ds_outliers;
    ods output outlierdetails=outlierdetails;
  	identify var=dk  noprint;
	by region;
	estimate method=ml;
	outlier id=date;
run;
--
Paige Miller

View solution in original post

1 REPLY 1
PaigeMiller
Diamond | Level 26

Any SAS output (like the output table) can be output to a data set via ODS OUTPUT, you can see all the table names for PROC ARIMA here (and similarly for any PROC by looking for Details/Table Names) and you want the table OUTLIERDETAILS

 

So you want 

 

proc arima data=CASUSER.ds out=ds_outliers;
    ods output outlierdetails=outlierdetails;
  	identify var=dk  noprint;
	by region;
	estimate method=ml;
	outlier id=date;
run;
--
Paige Miller

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 725 views
  • 1 like
  • 2 in conversation