I use
ods output Arima.Identify.AutoCorrGraph= ACF;
ods output Arima.Identify.PACFGraph = PACF;
to output the acf, pacf for arima. But they do not have critical values. Is there anyway to get it? Thanks.
Hi @happydog,
The ODS OUTPUT data sets you created from PROC ARIMA include the approximate upper and lower 95% confidence limits about the autocorrelations and partial autocorrelations for each lag. These confidence limits allow you to determine the significance of the autocorrelation or partial autocorrelation at each lag using an approximate alpha level of 0.05.
P-values are more useful than critical values, since they can be used to determine significance at different alpha levels. Since you are looking at the ACF and PACF associated with the original (or differenced) series computed by the IDENTIFY statement in PROC ARIMA, another alternative to see these autocorrelation functions is PROC TIMESERIES. The CORR statement in PROC TIMESERIES allows you to explicitly indicate the statistics to write to the OUTCORR= data set. These statistics include the ACFPROB and PACFPROB, which are the p-values associated with the autocorrelations and partial autocorrelations.
Following, please find an example which compares the results of the OUTCOV= data set created by the IDENTIFY statement in PROC ARIMA, with the corresponding values written to the OUTCORR= data set by PROC TIMESERIES. In addition to the autocorrelations and partial autocorrelations, the OUTCORR= data set generated by PROC TIMESERIES also includes the ACFPROB and PACFPROB variables when these options are specified in the CORR statement:
data air;
set sashelp.air;
y=log(air);
run;
proc arima data=air plots=all;
identify var=y nlag=12 outcov=cov;
run;
quit;
proc timeseries data=air plots=corr outcorr=corr_pvals;
id date interval=month;
var y;
corr lag n acf pacf acfstd acfprob pacfprob / nlag=12;
run;
/* data set generated by PROC ARIMA OUTCOV= option */
proc print data=cov;
var lag n corr stderr partcorr;
run;
/* data set generated by PROC TIMESERIES OUTCORR= option */
/* which includes ACFPROB and PACFPROB variables */
proc print data=corr_pvals;
run;
For more details on PROC TIMESERIES, please see the following documentation link:
I hope this helps!
DW
Modif from a SAS Doc example:
proc arima data=seriesj plots(unpack)=all;
/*--- Cross-correlation of prewhitened series ---------------*/
identify var=y crosscorr=(x) nlag=12;
ods output SeriesACFPlot=SAP SeriesPACFPlot=SPP;
run;
Hi @happydog,
The ODS OUTPUT data sets you created from PROC ARIMA include the approximate upper and lower 95% confidence limits about the autocorrelations and partial autocorrelations for each lag. These confidence limits allow you to determine the significance of the autocorrelation or partial autocorrelation at each lag using an approximate alpha level of 0.05.
P-values are more useful than critical values, since they can be used to determine significance at different alpha levels. Since you are looking at the ACF and PACF associated with the original (or differenced) series computed by the IDENTIFY statement in PROC ARIMA, another alternative to see these autocorrelation functions is PROC TIMESERIES. The CORR statement in PROC TIMESERIES allows you to explicitly indicate the statistics to write to the OUTCORR= data set. These statistics include the ACFPROB and PACFPROB, which are the p-values associated with the autocorrelations and partial autocorrelations.
Following, please find an example which compares the results of the OUTCOV= data set created by the IDENTIFY statement in PROC ARIMA, with the corresponding values written to the OUTCORR= data set by PROC TIMESERIES. In addition to the autocorrelations and partial autocorrelations, the OUTCORR= data set generated by PROC TIMESERIES also includes the ACFPROB and PACFPROB variables when these options are specified in the CORR statement:
data air;
set sashelp.air;
y=log(air);
run;
proc arima data=air plots=all;
identify var=y nlag=12 outcov=cov;
run;
quit;
proc timeseries data=air plots=corr outcorr=corr_pvals;
id date interval=month;
var y;
corr lag n acf pacf acfstd acfprob pacfprob / nlag=12;
run;
/* data set generated by PROC ARIMA OUTCOV= option */
proc print data=cov;
var lag n corr stderr partcorr;
run;
/* data set generated by PROC TIMESERIES OUTCORR= option */
/* which includes ACFPROB and PACFPROB variables */
proc print data=corr_pvals;
run;
For more details on PROC TIMESERIES, please see the following documentation link:
I hope this helps!
DW
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!
Learn how to run multiple linear regression models with and without interactions, presented by SAS user Alex Chaplin.
Find more tutorials on the SAS Users YouTube channel.