On Wed, 3 Jun 2015, Koray Simsek wrote:
Dear Allin and Sven,
Many thanks for your quick responses. I do agree with Sven that it
shouldn't matter qualitatively, but I think that it should be considered
normal to expect quantitatively consistent results when running the same
test, even though it's through different procedures.
By the way, I downloaded and installed the current snapshot (1.10.90.cvs
build date 2015-05-30) but the results are still different.
adf runs the test-down on the common data set (N-1-maxlag) for lag
selection, but reports the "optimal" lag ADF results on the full data set
(N-1-bestlag).
coint reports the ADF results directly from the test-down run for the
"optimal" lag (N-1-maxlag).
I'm not sure I understand this. For reference I'm appending a script
and its output. I'm seeing identical single-variable ADF tests on the
variable LRM in the context of "adf" and "coint". In both cases we
start with the specified max of 5 lags and find that AIC is minimized
at 5 lags, so we lose 6 observations.
When it comes to the cointegrating regression we run that on all
available data, and testing down on the residuals from this
regression we find that the optimal lag order is 0, so we lose only
one observation in the final (A)DF regression.
I can see there are certain points in the process where we might do
things differently -- e.g. restrict the cointegrating regression to
the same sample as the initial ADF regressions? But I'm not seeing
anything I would describe as inconsistent.
<hansl>
open denmark.gdt
adf 5 LRM --c --test-down --verbose
coint 5 LRM LRY --test-down --verbose
</hansl>
<output>
gretl version 1.10.90cvs
Copyright Ramu Ramanathan, Allin Cottrell and Riccardo "Jack" Lucchetti
This is free software with ABSOLUTELY NO WARRANTY
Current session: 2015-06-03 10:45
? run simsek.inp
/home/cottrell/stats/esl/gretl/build/cli/simsek.inp
? open denmark.gdt
Read datafile /opt/esl/share/gretl/data/misc/denmark.gdt
periodicity: 4, maxobs: 55
observations range: 1974:1 to 1987:3
Listing 5 variables:
0) const 1) LRM 2) LRY 3) IBO 4) IDE
? adf 5 LRM --c --test-down --verbose
k = 5: AIC = -198.839
k = 4: AIC = -197.883
k = 3: AIC = -195.102
k = 2: AIC = -196.848
k = 1: AIC = -187.891
k = 0: AIC = -189.709
Augmented Dickey-Fuller test for LRM
including 5 lags of (1-L)LRM
(max was 5, criterion AIC)
sample size 49
unit-root null hypothesis: a = 1
test with constant
model: (1-L)y = b0 + (a-1)*y(-1) + ... + e
1st-order autocorrelation coeff. for e: 0.035
lagged differences: F(5, 42) = 4.012 [0.0046]
estimated value of (a - 1): -0.0300808
test statistic: tau_c(1) = -0.775124
asymptotic p-value 0.8255
Augmented Dickey-Fuller regression
OLS, using observations 1975:3-1987:3 (T = 49)
Dependent variable: d_LRM
coefficient std. error t-ratio p-value
-------------------------------------------------------
const 0.357614 0.454896 0.7861 0.4362
LRM_1 -0.0300808 0.0388078 -0.7751 0.8255
d_LRM_1 0.183648 0.145021 1.266 0.2124
d_LRM_2 0.304352 0.143462 2.121 0.0398 **
d_LRM_3 -0.0249137 0.153967 -0.1618 0.8722
d_LRM_4 0.317505 0.153274 2.071 0.0445 **
d_LRM_5 -0.261515 0.161820 -1.616 0.1136
AIC: -198.839 BIC: -185.597 HQC: -193.815
? coint 5 LRM LRY --test-down --verbose
Step 1: testing for a unit root in LRM
k = 5: AIC = -198.839
k = 4: AIC = -197.883
k = 3: AIC = -195.102
k = 2: AIC = -196.848
k = 1: AIC = -187.891
k = 0: AIC = -189.709
Augmented Dickey-Fuller test for LRM
including 5 lags of (1-L)LRM
(max was 5, criterion AIC)
sample size 49
unit-root null hypothesis: a = 1
test with constant
model: (1-L)y = b0 + (a-1)*y(-1) + ... + e
1st-order autocorrelation coeff. for e: 0.035
lagged differences: F(5, 42) = 4.012 [0.0046]
estimated value of (a - 1): -0.0300808
test statistic: tau_c(1) = -0.775124
asymptotic p-value 0.8255
Augmented Dickey-Fuller regression
OLS, using observations 1975:3-1987:3 (T = 49)
Dependent variable: d_LRM
coefficient std. error t-ratio p-value
-------------------------------------------------------
const 0.357614 0.454896 0.7861 0.4362
LRM_1 -0.0300808 0.0388078 -0.7751 0.8255
d_LRM_1 0.183648 0.145021 1.266 0.2124
d_LRM_2 0.304352 0.143462 2.121 0.0398 **
d_LRM_3 -0.0249137 0.153967 -0.1618 0.8722
d_LRM_4 0.317505 0.153274 2.071 0.0445 **
d_LRM_5 -0.261515 0.161820 -1.616 0.1136
AIC: -198.839 BIC: -185.597 HQC: -193.815
Step 2: testing for a unit root in LRY
k = 5: AIC = -217.928
k = 4: AIC = -219.841
k = 3: AIC = -220.730
k = 2: AIC = -222.395
k = 1: AIC = -224.395
k = 0: AIC = -225.512
Augmented Dickey-Fuller test for LRY
including 0 lags of (1-L)LRY
(max was 5, criterion AIC)
sample size 49
unit-root null hypothesis: a = 1
test with constant
model: (1-L)y = b0 + (a-1)*y(-1) + e
1st-order autocorrelation coeff. for e: 0.154
estimated value of (a - 1): -0.128707
test statistic: tau_c(1) = -2.47723
p-value 0.1271
Dickey-Fuller regression
OLS, using observations 1975:3-1987:3 (T = 49)
Dependent variable: d_LRY
coefficient std. error t-ratio p-value
-------------------------------------------------------
const 0.772640 0.309740 2.494 0.0162 **
LRY_1 -0.128707 0.0519562 -2.477 0.1271
AIC: -225.512 BIC: -221.729 HQC: -224.077
Step 3: cointegrating regression
Cointegrating regression -
OLS, using observations 1974:1-1987:3 (T = 55)
Dependent variable: LRM
coefficient std. error t-ratio p-value
--------------------------------------------------------
const 0.929031 0.848846 1.094 0.2787
LRY 1.81866 0.142595 12.75 8.80e-18 ***
Mean dependent var 11.75441 S.D. dependent var 0.152357
Sum squared resid 0.308048 S.E. of regression 0.076238
R-squared 0.754248 Adjusted R-squared 0.749611
Log-likelihood 64.54124 Akaike criterion -125.0825
Schwarz criterion -121.0678 Hannan-Quinn -123.5300
rho 0.856564 Durbin-Watson 0.298798
Step 4: testing for a unit root in uhat
k = 5: AIC = -170.487
k = 4: AIC = -172.373
k = 3: AIC = -174.126
k = 2: AIC = -176.069
k = 1: AIC = -176.656
k = 0: AIC = -177.323
Augmented Dickey-Fuller test for uhat
including 0 lags of (1-L)uhat
(max was 5, criterion AIC)
sample size 54
unit-root null hypothesis: a = 1
model: (1-L)y = (a-1)*y(-1) + e
1st-order autocorrelation coeff. for e: -0.087
estimated value of (a - 1): -0.143436
test statistic: tau_c(2) = -1.95648
p-value 0.5548
Dickey-Fuller regression
OLS, using observations 1974:2-1987:3 (T = 54)
Dependent variable: d_uhat
coefficient std. error t-ratio p-value
-------------------------------------------------------
uhat_1 -0.143436 0.0733134 -1.956 0.5548
AIC: -192.742 BIC: -190.753 HQC: -191.975
There is evidence for a cointegrating relationship if:
(a) The unit-root hypothesis is not rejected for the individual variables, and
(b) the unit-root hypothesis is rejected for the residuals (uhat) from the
cointegrating regression.
Done
</output>
Allin Cottrell