Have data below 

27.34 11.52
29.41 12.28
29.53 12.07
29.63 11.89
30.09 12.06
29.93 12.04
29.8 12.12
28.81 11.63
30.15 12.36
29.38 12.06
28.56 11.91
28.02 11.51

The coint gives below

? coint 1 v1 v2

Step 1: testing for a unit root in v1

Augmented Dickey-Fuller test for v1
including one lag of (1-L)v1
sample size 10
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.038
   estimated value of (a - 1): -0.547219
   test statistic: tau_c(1) = -0.9848
   asymptotic p-value 0.7608

Step 2: testing for a unit root in v2

Augmented Dickey-Fuller test for v2
including one lag of (1-L)v2
sample size 10
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.636
   estimated value of (a - 1): -2.03223
   test statistic: tau_c(1) = -2.51525
   asymptotic p-value 0.1118

Step 3: cointegrating regression

Cointegrating regression -
OLS, using observations 2116-2127 (T = 12)
Dependent variable: v1

             coefficient   std. error   t-ratio   p-value
  -------------------------------------------------------
  const       -2.51980      6.46980     -0.3895   0.7051
  v2           2.65519      0.541085     4.907    0.0006  ***

Mean dependent var   29.22083   S.D. dependent var   0.872108
Sum squared resid    2.454878   S.E. of regression   0.495467
R-squared            0.706575   Adjusted R-squared   0.677233
Log-likelihood      -7.506284   Akaike criterion     19.01257
Schwarz criterion    19.98238   Hannan-Quinn         18.65351
rho                  0.519235   Durbin-Watson        0.745625

Step 4: testing for a unit root in uhat

Augmented Dickey-Fuller test for uhat
including one lag of (1-L)uhat
sample size 10
unit-root null hypothesis: a = 1

   model: (1-L)y = b0 + (a-1)*y(-1) + ... + e
   1st-order autocorrelation coeff. for e: -0.094
   estimated value of (a - 1): -0.676281
   test statistic: tau_c(2) = -2.36751
   asymptotic p-value 0.34

There is evidence for a cointegrating relationship if:
(a) The unit-root hypothesis is not rejected for the individual variables.
(b) The unit-root hypothesis is rejected for the residuals (uhat) from the
    cointegrating regression.

Manually do a adf on the $uhat of the v1 const v2 but the output is different from the coint
output

? ols v1 const v2

Model 8: OLS, using observations 2116-2127 (T = 12)
Dependent variable: v1

             coefficient   std. error   t-ratio   p-value
  -------------------------------------------------------
  const       -2.51980      6.46980     -0.3895   0.7051
  v2           2.65519      0.541085     4.907    0.0006  ***

Mean dependent var   29.22083   S.D. dependent var   0.872108
Sum squared resid    2.454878   S.E. of regression   0.495467
R-squared            0.706575   Adjusted R-squared   0.677233
F(1, 10)             24.08028   P-value(F)           0.000617
Log-likelihood      -7.506284   Akaike criterion     19.01257
Schwarz criterion    19.98238   Hannan-Quinn         18.65351
rho                  0.519235   Durbin-Watson        0.745625

? series y = $yhat
Generated series y (ID 4)
? series y0 = v1 - y
Generated series y0 (ID 5)
? adf 1 y0

Augmented Dickey-Fuller test for y0
including one lag of (1-L)y0
sample size 10
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.156
   estimated value of (a - 1): -0.72329
   test statistic: tau_c(1) = -2.48974
   asymptotic p-value 0.1179

   with constant and trend
   model: (1-L)y = b0 + b1*t + (a-1)*y(-1) + ... + e
   1st-order autocorrelation coeff. for e: -0.494
   estimated value of (a - 1): -0.675761
   test statistic: tau_ct(1) = -2.74247
   asymptotic p-value 0.2193

What is making the different on the t value and p value? The ols have no problem

The second problem is the save tab on the .show save the $uhat scatterplot against time and not
saving the $uhat from the scatterplot from v1 v2. They are quite different and adf apply
on both give different output

adf on $uhat scatterplot against time

? adf 1 y0

Augmented Dickey-Fuller test for y0
including one lag of (1-L)y0
sample size 10
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.156
   estimated value of (a - 1): -0.72329
   test statistic: tau_c(1) = -2.48974
   asymptotic p-value 0.1179

   with constant and trend
   model: (1-L)y = b0 + b1*t + (a-1)*y(-1) + ... + e
   1st-order autocorrelation coeff. for e: -0.494
   estimated value of (a - 1): -0.675761
   test statistic: tau_ct(1) = -2.74247
   asymptotic p-value 0.2193

adf on $uhat scatterplot

? adf 1 y

Augmented Dickey-Fuller test for y
including one lag of (1-L)y
sample size 10
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.167
   estimated value of (a - 1): -0.169909
   test statistic: tau_c(1) = -1.41724
   asymptotic p-value 0.5755

   with constant and trend
   model: (1-L)y = b0 + b1*t + (a-1)*y(-1) + ... + e
   1st-order autocorrelation coeff. for e: -0.461
   estimated value of (a - 1): -0.719062
   test statistic: tau_ct(1) = -2.2661
   asymptotic p-value 0.4521

Using series m = v1 - $yhat gives the $uhat against time. Have to manually export the
data and sort the $uhat against v2 rather time

Is there a way to save the $uhat against v2? There is a graph tab against v2 but how to save the $uhat against v2?

clarodina









Reply via email to