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.
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;
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;
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.
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.
Ready to level-up your skills? Choose your own adventure.