Hello @daisywl
If you specify ADF option, the output in PROC ARIMA contains p values for the ADF test, as in the columns 'Pr<Rho', 'Pr<Tau', 'Pr > F'. If by saying "how to set the AIC/BIC option for lag length", you are asking if there is an option in PROC ARIMA to select the number of augmenting lags based on AIC/BIC in performing the ADF stationarity test, then PROC ARIMA does not provide an option to select the number of augmenting lags using AIC/BIC method, or using any other method. You will need to determine the number of augmenting lags yourself when performing the ADF test in PROC ARIMA.
There are different ways to select number of augmenting lags in ADF test. Dr. David Dickey illustrates one approach to select the number of augmenting lags in performing ADF test in the following Global Forum paper, which uses F test in PROC REG to test for significance on the coefficients associated with the lags in the regression. In particular, this approach is discussed in section 7 of the paper:
https://support.sas.com/resources/papers/proceedings/proceedings/sugi30/192-30.pdf
Another SAS/ETS procedure, PROC AUTOREG supports some additional stationarity tests(in addition to the ADF test), e.g., ERS, NP stationarity tests, which use some information criteria(SBC for ERS test and modified AIC for the NP test) to determine the number of lags to be included in the regression. You can specify ERS option, NP option in the MODEL statement in PROC AUTOREG to requests these tests:
https://go.documentation.sas.com/doc/en/pgmsascdc/v_050/etsug/etsug_autoreg_syntax06.htm#etsug_autor...
then scroll down to:
STATIONARITY=(ERS)
STATIONARITY=(ERS=(value))
STATIONARITY=(NP)
STATIONARITY=(NP=(value))
where 'value' is the maximum lag length to be considered in the lag order selection in the stationarity test.
I hope this helps.