FUNCTION REFERENCE
adftest
Augmented Dickey-Fuller unit-root test.
Augmented Dickey-Fuller unit-root test.
Syntax
[h,pValue,stat,cValue,reg] = adftest(y,Model='AR',Lags=0,Test='t1',Alpha=.05)Models: AR has no deterministic terms; ARD adds an intercept; TS adds intercept and trend. Lags counts lagged differences. Test t1 is the studentized phi-1, t2 is T*(phi-1)/(1-sum(b)), and F tests joint restrictions (phi=1,c=0) for ARD or (phi=1,trend=0) for TS. AR has no F test. NaNs are removed before lagging. Vector Lags, Alpha, Model and Test expand scalars and must otherwise match in length. reg contains coefficient, covariance, residual, fitted-value and fit statistics.
Example
[h,p,s,c,r]=adftest([1 3 2 5 4 7 6 2 3 1 5 2],Model='ARD',Lags=1)Differences from MATLAB: t1/t2 use published MacKinnon (1996) finite-sample response surfaces with linear quantile interpolation; p-values clamp to [.001,.999] with warnings. These differ from MATLAB's private simulation tables. F uses Dickey-Fuller (1981) phi1/phi3 tables, interpolated in 1/T and probability; its published range is [.01,.99], also the supported F Alpha and p-value range. Samples below 20 (F:25) use the minimum table size with a warning. Numeric vectors only; tables/timetables unsupported. Bounds: 2048 lags, 1024 tests, 2000000 design elements and 100000000 work units. reg.names is a string vector.
Reference: https://www.mathworks.com/help/econ/adftest.html
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.