Open Gretl and open the data file.

We now want to check to see if the exchange rate (EXCH) has a unit root. To do this, first choose the variable EXCH by highlighting it, as in the diagram above. We then choose VARIABLE and Augmented Dickey-Fuller test from the list of Gretl options at the top of the main Gretl window. You must choose a lag length for the ADF test. You can try 4 lags when you have quarterly data. The lag length dialog box looks like the following:

After entering the lag length you just click on OK and the ADF test is automatically run for you. The output is as follows:

At the top of the page is the simple Dickey-Fuller test for a unit root in EXCH. If

g = 0 then EXCH has a unit root and is non-stationary. If -1 < g < 0, then EXCH does not have a unit root and EXCH is stationary. That is, the DF test has

Ho: g = 0 and Ha: g < 0. At the top of the page we see that the DF test statistic is “not significant at the 10 percent level”. This means that we cannot reject Ho. Therefore, we conclude that EXCH has a unit root.

Below the DF test is the ADF test. It adds lags and a time trend to the DF test. We chose 4 lags, so the test regression uses d_EXCH_4 as the maximum lag. We test the hypothesis Ho : coefficient on “time” = 0 and coefficient on “EXCH_1” = 0.

This is a special type of F test, although the distribution is not exactly the F-distribution. As you can see the p-value is greater than 0.10. Therefore, we cannot reject the Ho hypothesis that EXCH has a unit root. That is, EXCH has a unit root.

Problem: Test the variable trade = (X-IMP)/Y for a unit root using Gretl.