1
$\begingroup$

I'm studying the stationarity with unit root tests and the order of integration in time series $\ln(x)$ and $\ln(y)$ found here. I'm using Dickey-Fuller test with constant but no trend.

From what I understand, the null hypothesis for ADF test is that there is a unit root present (non-stationary, random walk) and $I(d)$ process is stationary after differenced $d$ times. I tried the test for my data:

    df <- read.table(file="ts.txt", header=TRUE, sep="\t")
    x <- as.ts(log(df$x)) #ln(x)
    y <- as.ts(log(df$y)) #ln(y)


    testx <- ur.df(x,type="drift",lags=1) #drift should add constant but no trend right?
    summary(textx)

    testy <- ur.df(y,type="drift",lags=1)
    summary(texty)

What I get for $\ln(x)$

    Coefficients:
                 Estimate Std. Error t value Pr(>|t|)    
    (Intercept)  0.040945   0.018828   2.175   0.0300 *  
    z.lag.1     -0.008988   0.004265  -2.107   0.0355 *  
    z.diff.lag   0.281566   0.037438   7.521  1.8e-13 ***
    ---
    Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

    Residual standard error: 0.06311 on 656 degrees of freedom
    Multiple R-squared:  0.08326,   Adjusted R-squared:  0.08047 
    F-statistic: 29.79 on 2 and 656 DF,  p-value: 4.133e-13


    Value of test-statistic is: -2.1074 2.434 

    Critical values for test statistics: 
          1pct  5pct 10pct
    tau2 -3.43 -2.86 -2.57
    phi1  6.43  4.59  3.78

And for $\ln(y)$

Coefficients:
             Estimate Std. Error t value Pr(>|t|)    
(Intercept)  0.032859   0.016654   1.973   0.0489 *  
z.lag.1     -0.007538   0.003989  -1.890   0.0592 .  
z.diff.lag   0.288379   0.037367   7.717 4.44e-14 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 0.06192 on 656 degrees of freedom
Multiple R-squared:  0.08604,   Adjusted R-squared:  0.08325 
F-statistic: 30.88 on 2 and 656 DF,  p-value: 1.53e-13


Value of test-statistic is: -1.8899 2.0388 

Critical values for test statistics: 
      1pct  5pct 10pct
tau2 -3.43 -2.86 -2.57
phi1  6.43  4.59  3.78

What values should I be looking when rejecting/accepting $H_0$? And how can I find the order of integration in this case?

$\endgroup$
3
$\begingroup$

Yes H0 is the hypothesis, that you have a unit root in your data. If you type drift, there will be a constant but no trend in your model as you mentioned. the critical values are listed at the bottom of the test. So for example for ln(x) the ur.df function gives you the value of test- statistic which in your case is: -2.1074 since this is not smaller than the critical value of -2.86 ( I assume you use the 5% level) you can not reject H0. For the order of integration: run the same test again, but this time using the first difference of your variable. If you can reject H0 this time your series is I(0) if not you have to take the second difference and then test again. If you can reject H0 after taking the second difference your series is I(2), and so on...

$\endgroup$
  • $\begingroup$ So $ln(y)$ process IS stationary because $-1.8899<-2.86$? And for that one I cannot find order of difference (the order is 0 basically). $\endgroup$ – ELEC Apr 1 '15 at 19:19
  • $\begingroup$ No, in order to reject H0 the value has to be smaller than the critical value. In your case -1.8899 is biger than -2.86 so you can not reject H0. Since H0 states that there is a unit root, and you can not reject H0, ln(y) has a unit root $\endgroup$ – Michael B Apr 1 '15 at 19:23
  • $\begingroup$ so take the first difference of ln(y) and then run the test again. If the value of the ADF test is smaller than -2.86 the first difference of ln(y) is stationary. Since you only had to take the first difference in order to make ln(y) stationary, ln(y) is said to be I(1) $\endgroup$ – Michael B Apr 1 '15 at 19:26
  • $\begingroup$ Haha yeah I was stupid (long day). Didn't notice the negative sign and just compared the absolute values in my mind :) Thanks for clear explanation ! $\endgroup$ – ELEC Apr 1 '15 at 19:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.