# Augmented Dickey–Fuller test, Test Model

I don't understand how we obtain the model that we test for a unit root in the ADF test. Let me explain better.

ADF test is used to test if a time series has a unit-root. We assume that the Data Generating Process of the time series is an AR(p).

$$Y_t = \rho_1\cdot Y_{t-1} + \rho_2\cdot Y_{t-2} + \rho_3\cdot Y_{t-3} +...+ \rho_p\cdot Y_{t-p} + \upsilon_t$$ $$\upsilon_t \sim i.i.d.\text{N} \Big( 0, \sigma^{2}\Big)$$

In order to do so, ADF test the null hypothesis that $$\phi = 0$$ on the following model. $$\Delta{Y_t} = \phi\cdot Y_{t-1}+ \gamma_1\cdot \Delta{Y_{t-1}} + \gamma_2\cdot \Delta{Y_{t-2}} + \gamma_3\cdot \Delta{Y_{t-3}} +...+ \gamma_{p-1}\cdot \Delta{Y_{t-p+1}} + \upsilon_t$$

My question is how did we derive the second model from the first one? Which math operations are required?

I tried to subtract $$Y_{t-1}$$ from both side, some other manipulation and rearrangements but I didn't succeed. Lagged error terms always came up.

The book "Applied Time Series Econometrics" from Lütkepohl states that:

Any suggestions? Am I misunderstanding or forgetting something?

Slightly adapting my answer in Why do we need a VECM specification if the I(1) processes are cointegrated?, assume the following $$AR(p)$$ $$$$\tag{1}\label{1} y_t = \alpha + \phi_1{y_{t-1}} + \ldots + \phi_p{y_{t - p}} + \epsilon_t$$$$ Using lag operators we can write this as $$(1 - \phi_1{L^1} - \ldots - \phi_pL^p) \cdot y_t = \phi(L) y_t = \alpha + \epsilon_t$$ Define $$$$\tag{2}\label{2} \rho \equiv \phi_1 + \phi_2 + \ldots + \phi_p$$$$ and $$$$\tag{3}\label{3} \zeta_s \equiv - [\phi_{s + 1} + \phi_{s + 2} + \ldots + \phi_p]$$$$ Rewrite $$1 - \phi_1{L^1} - \ldots - \phi_pL^p$$ by adding and immediately subtracting the coefficients of order $$j+1$$ to $$p$$ on the lag operator of order $$j$$. We get $$\begin{gathered} 1 - [(\phi_1 + \phi_2 + \ldots + \phi_p) - (\phi_2 + \phi_3 + \ldots + \phi_p)]L \hfill \\ - [(\phi_2 + \ldots + \phi_p) - (\phi_3 + \ldots + \phi_p)]L^2 \hfill \\ - [{\phi_{p-1}} + \phi_p - \phi_p]L^{p-1} - \phi_pL^p \hfill \\ \end{gathered}$$
Using \eqref{2} and \eqref{3} yields $$1 - (\rho + \zeta_1)L - (\zeta_2 - \zeta_1)L^2 - \ldots - (\zeta_{p-1} - {\zeta_{p-2}})L^{p-1} - ( - \zeta_{p-1})L^p_ \cdot$$ Solving the terms in brackets gives $$$$\tag{4}\label{4} 1 - \rho L - \zeta_1L - \zeta_2L^2+\zeta_1L^2 - \ldots - \zeta_{p-1}L^{p-1} + {\zeta_{p-2}}L^{p-1} - ( - \zeta_{p-1})L^p$$$$ The $$\zeta_i$$ appear both before the $$i$$th lag operator and, with reverse sign, before the $$i+1$$th lag operator. We can hence rewrite \eqref{4} as $$1 - \rho L - (\zeta_1L + \zeta_2L^2 + \ldots + \zeta_{p-1}L^{p-1})(1-L)$$ Hence, we have rewritten \eqref{1} as $$\left[ 1 - \rho L - \left( \zeta_1L + \zeta_2L^2 + \ldots + \zeta_{p-1}L^{p-1} \right)(1-L) \right]y_t = \alpha + \epsilon_t$$ Multiplying out the square brackets, using $$\Delta=1-L$$, applying the lag operators and rearranging yields $$y_t = \alpha + \rho y_{t-1} + \zeta_1\Delta y_{t-1} + \zeta_2\Delta y_{t-2} + \ldots + \zeta_{p-1}\Delta y_{t-p+1} + \epsilon_t$$ Subtract $$y_{t-1}$$ from either side to get $$$$\tag{5}\label{5} \Delta y_t = \alpha + (\rho - 1)y_{t-1} + \zeta_1\Delta y_{t-1} + \zeta_2\Delta y_{t-2} + \ldots + \zeta_{p-1}\Delta y_{t-p+1} + \epsilon_t$$$$