1

I have been implementing dickey fuller test after gaining an understanding of its procedure.. The relevant equations are

enter image description here

enter image description here

I have obtained the value for t-stat as +ve and hence when comparing with the table for alpha= 0.05 the result shows it is not stationary. I am confident that my data is stationary because on plotting the data it's stationary.

What I dont understand is how can the t-stat value ever be negative when numtr and denmtr are positive. The theta value or p_hat is positive(by OLS estimation) and SE as it has squares in the equation will also yield a +ve value.

My assumption:

Can it be because, rooting in SE gives -ve value(as square of a number, both +ve and -ve is the same). Or my theta value has to be -ve but can that be?

Any help on this great thanx.

Edit made: Image After seasonality removed for m = 4 enter image description here

Edit done(2) Before seasonality

enter image description here

Devi
  • 31

1 Answers1

0

The Dickey Fuller test tests between two cases: unit root (integrated time series), which is the null hypothesis and a stationary time series which is the alternative hypothesis. In writing the model for the test (by differencing the AR model), the coefficient for the $y_{t-1}$ term is $p=\rho-1$. $$\Delta y_t=p y_{t-1} + \epsilon_t$$

$p$ being positive means $\rho > 1$ which is explosive growth, which you said from a plot of the series is obviously not the case. So the test is being used to only distinguish between $p<0$ and the null, $p=0$.

It's not true that the numerator in the test statistic is positive. It's negative and the denominator is always positive.

As to why you got it positive in your OLS, Did you apply differencing? Enough number of times?

Btw, are you using the right one of the three versions of the test? https://en.m.wikipedia.org/wiki/Dickey–Fuller_test

Mathemagical
  • 3,489
  • Thanks lots for the replyy...What I tried is OLS estimation for p_hat using the formula $\sum_i(yx) / \sum_i (x^2) $ obtained for the eqn $ y = \theta x$. For the airline dataset, I have taken log transformation and then first order differencing..PLs point out where I went wrong.. – Devi Oct 30 '17 at 04:02
  • Is the $\theta$ (p_hat) value different for the equation $\Delta{y_t} = p*y_{t-1} +\epsilon_t$ using OLS? – Devi Oct 31 '17 at 03:32
  • Yes. You should try first with that equation. If the coefficient is positive, take the series $z_t=y_t- y_{t-1}$. And if that still is giving you a positive coefficient, try it on the series $w_t=z_t- z_{t-1}$ and so on. If am in a remote area with no computer, just phone, so cannot see you data set etc. So, please include as much detail in your equations if further discussion needed. If wishing to show a figure, you could edit your question to include the figure. – Mathemagical Oct 31 '17 at 11:18
  • PLease can u go through https://math.stackexchange.com/questions/2497722/what-is-the-ols-estimate-for-deltay-t-py-t-1-epsilon-t?noredirect=1#comment5159453_2497722 – Devi Oct 31 '17 at 11:38
  • Also see the edit made – Devi Oct 31 '17 at 11:53
  • The column E graph shows seasonality. You should remove seasonality first. – Mathemagical Nov 01 '17 at 08:25
  • Thanx for the replyy..Can you guide as of how to detect seasonality from dataset or plot and which strategy to remove them. – Devi Nov 01 '17 at 09:34
  • My knowledge was to apply log transformation and then differencing to make a non-stationary data into stationary one. I have seen many sites specifying the same. – Devi Nov 01 '17 at 11:52
  • 1
    Well, because every fourth point in the plot dips down (seems like quarterly data). You can read about seasonality and seasonal adjustment on wiki here (look for the regression analysis section) https://en.m.wikipedia.org/wiki/Seasonality – Mathemagical Nov 01 '17 at 14:01
  • 1
    For your specific situation, though, this website would offer you the most direct way to deal with it. https://www.otexts.org/fpp/8/1 – Mathemagical Nov 01 '17 at 14:02
  • Thank u much for the worthy guidance!.. one question is how many values will be there be after seasonal differencing of data. For m = 4(since quarterly data) is it T - 4 ?? – Devi Nov 03 '17 at 06:12
  • Also please see the added image above. I feel yet it is not stationary. Am I correct – Devi Nov 03 '17 at 08:03
  • This looks like it could be stationary. What did the DF test show? Negative coefficient? Yes, of course, differencing would cause 3 fewer points. – Mathemagical Nov 04 '17 at 03:42
  • yes..I could get -ve coefficient as -0.0002 but value is not less than -1.95 (5% significance level). Just to note : since T-4 values will be present while plotting graph I have given 0 value to first four records! – Devi Nov 04 '17 at 03:45
  • Try differencing the series one more time. What is the new DF coefficient then? – Mathemagical Nov 04 '17 at 03:46
  • Sorry.. a mistake...I have obtained −0.000285953 as DF test value after performing seasonal diff and then first order diff...After seasonal diff alone the value was positive – Devi Nov 04 '17 at 03:57
  • I mean one more diff after that – Mathemagical Nov 04 '17 at 04:15
  • Did it work now? – Mathemagical Nov 05 '17 at 06:07
  • The latest result obtained is -1.5702. – Devi Nov 06 '17 at 06:33
  • How can one understand the number of times of differencing ? or do I have to modify seasonal differencing with another m value to cut the steps of first differencing. – Devi Nov 07 '17 at 04:26
  • Nothing wrong or hacky about differencing too many times. If you have to do differencing m times to reach stationarity, the series is called "integrated of order m". You can google search that term or just "stationarity" to read more. I think I need to try for a – Mathemagical Nov 07 '17 at 04:43
  • 1
    Seasonality - I think what you have already done is enough. The data was visibly quarterly so other periods are not useful to try. – Mathemagical Nov 07 '17 at 05:59
  • Curious to know how many times you had to difference to get stationarity – Mathemagical Nov 07 '17 at 12:34
  • I have tried 15 times and yet not smaller than -1.95. Is there any sense in differencing this way ? – Devi Nov 08 '17 at 05:36
  • ACF plot of transformed data.. can it help some way to foresee the steps/no.of steps to be undertaken for stationarity – Devi Nov 08 '17 at 05:40
  • Yeah. 15 is way more than normal. 2 or 3 and after that the pursuit is usually fruitless. ACF (which is not shown) can suggest what lag to use for seasonality, but I don’t see how it can be used for finding the order of integration. You have removed the 3 plots you first had, but if I recall right there was a trend as well? Did you try the models with drift and trend for the DF test? – Mathemagical Nov 08 '17 at 12:24
  • See the edit made – Devi Nov 09 '17 at 04:06
  • I mean the original data looked like it had drift too, right? – Mathemagical Nov 09 '17 at 04:08
  • What is the difference between seasonality and drift ? – Devi Nov 09 '17 at 08:51
  • Moreover, will the theta estimate change when considering the regression equation with drift term added ? – Devi Nov 09 '17 at 09:13