Calculate the sup ADF and the generalized sup ADF statistics using the backward ADF statistic sequence and the backward SADF statistic sequence, respectively.
sadf_gsadf(y, adflag, mflag, IC, parallel = FALSE)
the time series.
the lag order for the ADF test.
1 for ADF with constant and whithout trend, 2 for ADF with constant and trend and 3 for ADF without constant and trend.
1 for AIC and 2 for BIC.
If TRUE, uses parallel computing for the loop. If the data is large it could be faster, but usually it is slower for small data.
Phillips, P.C. & Shi, S. & Yu, J. (2015a). "Testing for Multiple Bubbles: Historical Episodes of Exuberance and Collapse in the S&P 500". SSRN Electronic Journal.