3

I am new to time series analysis and I have the following question

The purpose of my research is to build a regression between two time series. The length of my sample is 21 observations.

I have a situation like this: The ADF test with trend and constant shows that the time series is stationary (although it has a trend).

The question that interests me: Do I need to take the first differences of such a time series? Or can a regression be done with the original time series values (i.e. without the first differences)?

If yes, then if there is a trend in the time series, then it is necessary to use the ADF test without a trend?

Vitalii
  • 39
  • 1
  • 6
  • Your sample size is 21? Have you consider the size and power issues of unit root tests in finite sample? (Do a simple simulation for ADF with your sample size. Be prepared for severe disappointment.) "Do I need to take the first differences of such a time series?"---if you believe your ADF rejection of the unit root null, why would you first difference? – Michael Aug 21 '20 at 09:14
  • @Michael Obviously, with this sample size, power issues of unit root test is debatable... If there is a trend in a time series, can such a time series be considered stationary? As far as I understand, such a time series can be considered stationary only relative to the trend. But is it reasonable to do a regression with such time series without removing of the trend? – Vitalii Aug 21 '20 at 09:30

1 Answers1

2

Issue 1: Should you believe the ADF test?
Due to the very small sample size, the ADF test will have pretty low power, i.e. the ability to reject $H_0$ when it is incorrect. Your test does reject $H_0$, so power does not seem to be an issue. But this may go hand in hand with a possible size distortion. Instead of the nominal 5% significance level, the actual significance level may be very different (e.g. much higher) in a small sample.
Another thing is the specification of the model used in the ADF test. The test results are sensitive to the number of lags and inclusion/omission of the trend. The choices you make thus have to be considered carefully.
In sum, you should not be too confident in the test result.

Issue 2: Should you difference a time series that is stationary around a deterministic trend?
No. This is not advisable as it would remove a linear trend but at the same time introduce an artificial moving average component with a unit root into the resulting series. The phenomenon is known as overdifferencing. Hence, better not difference series with deterministic trends unless they have a unit root, too.
What you can do is model the time series by including the trend among the regressors. Note that the estimator of the slope coefficient will be superconsistent (converge to the estimand faster than usual). This property allows for an alternative approach: detrend the series first and then model the resultant stationary component further.

Richard Hardy
  • 54,375
  • 10
  • 95
  • 219
  • If you are showing a relationship between two variables one of which has a trend then you are going to have to consider issues of co-integration which is not a fun place to be for someone new to time series. The ADF has low power even with a lot of data. It is often argued you should chose both ADF and a method like KPSS which has the opposite hypothesis of ADF to test if there is stationarity. If you know you have a deterministic trend than differencing is not the solution, it deals with stochastic non-stationarity. – user54285 Aug 21 '20 at 17:28
  • @user54285, there cannot be cointegration among series that are stationary around deterministic trends; cointegration reqiures the series to have unit roots. The fact that ADF has rejected the null hypothesis means there was enough power, so it is a non issue for the OP. Combining ADF and KPSS is a good idea. The last sentence seems to reiterate what I wrote, so I agree with that. – Richard Hardy Aug 21 '20 at 17:54
  • thank you very much. I did not know that cointegration could not be used with a deterministic trend. I thought any time two variables trended together, had a long term equilibrium, they could be co integrated. Its remarkable after all I read about that recently none of the sources brought this up. :) I was not sure if ADF could or could not be used with a deterministic trend. Most of my time series reading is in economics and the view there is, from what I have read, that few economic series have a deterministic trend. Thanks again. – user54285 Aug 21 '20 at 19:12
  • @user54285, you are welcome! Certainly every educational piece on cointegration should start with the premise that the variables have unit roots. I suppose the absolute majority of them does. The term *co-integration* by itself suggests that we are dealing with integrated time series (i.e. ones with unit root, regardless of whether they have any deterministic trends in addition) that have something in common (and that thing is the stochastic trend – the one with the unit root). – Richard Hardy Aug 21 '20 at 19:31
  • The discussions commonly do raise the issue of unit roots, because commonly (ARDL bound testing being an exception) the cointegration methods require the variables be a similar order of integration. Are you saying that you can have a unit root and a deterministic trend (ADF has an option for a trend, but I did not realize this meant a deterministic one if indeed it does). If you do have both can you analyze the data with cointegration (that is with error correction models)? I never thought of what co-integrated meant before :) – user54285 Aug 21 '20 at 22:20
  • @RichardHardy "...so power does not seem to be an issue..."---it's not just power, though, but also that a critical value derived from asymptotic null distribution is being used at very small sample. For unit root tests, known to have severe finite sample distortions, the critical value that gives the test the 5% nominal size could have actual size of, e.g. 40% at this range of sample size. That would make the rejection meaningless. – Michael Aug 22 '20 at 03:27
  • 1
    @Michael, good point, size distortions can be an issue. I will mention that in my answer. But are the critical values actually derived from the asymptotic distribution or simulated? I got a bit confused after a discussion in the comments [here](https://stats.stackexchange.com/questions/474387/whats-the-relationship-between-cointegration-and-linear-regression#comment891745_474387) and [here](https://stats.stackexchange.com/questions/250505/can-dickey-fuller-be-used-if-the-residuals-are-non-normal). Would you have anything to say about that? – Richard Hardy Aug 22 '20 at 06:24
  • @user54285, yes, you can. See e.g. the 5 standard spcifications of Johansen test e.g. as implemented in the `ca.jo` function in the `urca` package in `R`. If I remember correctly, at least one of them allows for linear trends. – Richard Hardy Aug 22 '20 at 06:27
  • I used `ur.df ()` from the R package `urca` with `selectlags = "AIC"`. As a result, the number of lags was converted to 1. I added a trend variable to my regression model, but it was not significant. By detrend, do you mean to use the first differences in my time series or to decompose them? Additionally, I used `kpss.test ()` with a trend from `tseries` package. For both of my time series, the kpss test returned a `p-value = 0.02` – Vitalii Aug 22 '20 at 10:20
  • @Vitalіі, *detrend* is definitely not meant as doing first difference; I warned specifically against that in the part around *overdifferencing* and numerous other posts on this site. *Detrend* is meant as to fit a deterministic trend (a regression with a trend variable alone), obtain the residuals and use these for further analysis. – Richard Hardy Aug 22 '20 at 11:14
  • @RichardHardy, Now I understand what you mean, thanks. But I still cannot understand the benefits of the approach you described. I would be very grateful if you would advise me literature on this topic. – Vitalii Aug 22 '20 at 12:13
  • @Vitalіі, it is a bit difficult to recommend anything more concrete than a rigorous time series textbook such as Hamilton "Time Series Analysis". The benefits are lack of drawbacks. Alternative approaches would fail for different reasons, while this one is theoretically sound. It is tailored to the properties of the data generating process (DGP). If you had a DGP with different properties, a different approach would be needed. Not that one approach is universally better than another; they just have to fit the situation at hand. – Richard Hardy Aug 22 '20 at 12:26
  • @RichardHardy, thank you for your reply. The last question, which I hope will help me to better draw my final conclusions. As I said earlier, I have two small time series. Both are stationary relative to the ADF and KPSS unit root tests. What is the disadvantage of doing a regression model directly between these time series, as opposed to doing a regression model between the residuals of these time series from regression on the trend variable? – Vitalii Aug 22 '20 at 13:49
  • 1
    @Vitalіі, different models may answer different questions. if both $y_t$ and $x_t$ have linear trends (or generally trends of the same type, e.g. both quadratic) and you regress $y_t$ on $x_t$, the slope estimate will mainly show how the underlying trends relate. The stationary components around the trends will have negligible influence (though in a small sample such as yours anything can happen). If you wonder how deviations from trends relate, you may either detrend the series first or include a trend as a variable in the regression in addition to $x_t$. Depends on what you are interest in. – Richard Hardy Aug 22 '20 at 14:12
  • @RichardHardy I commented on the threads you linked to. – Michael Aug 23 '20 at 06:07
  • I think the fact that there are two types of non-stationarity (deterministic and stochastic) confuses people because the first rarely is covered. I am not sure how common deterministic models really are in real world data :) – user54285 Aug 23 '20 at 18:59