1
$\begingroup$

I have a line and I have detrended it but it seems to still have a trend. Visually it has one (see jpg) and it has a unit root (Dickey-Fuller) and fails the Durbin-Watson test, so it is not stationary. The line that I am calling 'detrended' is a plot of the residuals (errors) of a regression of the data on time. My question is why would a supposedly detrended line still have a trend?

datadata detrend

$\endgroup$
3
$\begingroup$

It would still have a trend if you have not properly detrended it. Trends are a complicated thing, and you may want to re-visit the model you are using to describe the trend.

First of all, if you're using a linear model, it is almost certainly wrong. You can clearly see a unit root, where the shock in September '06 propagates through time. The series does not revert to the mean. I would say this series is begging for a first-order differencing. That might give you a stationary series you can use for more traditional regression analysis. If that simple fix doesn't work, try an ARIMA model. If you don't know what that is, ask!

If I may ask, what is the goal of this analysis? Could you provide some example data that we might use to help you find a proper model?

$\endgroup$
  • $\begingroup$ Hi Zach. I have done a first-order differencing and the result is stationary, can be used in traditional regression analysis and it is fine. My question here is about a detrended line. I detrended the line by a) regressing against time using excel b) plotting the residuals. Is it the case that the residuals of a nonstationary line regressed against time in excel are themselves nonstationary? $\endgroup$ – paul Jul 30 '11 at 21:58
  • 1
    $\begingroup$ @paul: You have a non-stationary process here. De-trending through a linear regression vs. time is NOT going to work. $\endgroup$ – Zach Jul 30 '11 at 22:52
  • $\begingroup$ @Zach: In this case that is (probably) true, but not always. Consider the model $y_t = \beta t + \epsilon_t$ where $\epsilon_t$ is a stationary process. $\endgroup$ – cardinal Jul 31 '11 at 1:19
  • $\begingroup$ @cardinal: thanks educating me. I guess what I really mean is "look at the chart: linear de-trending isn't going to work." $\endgroup$ – Zach Jul 31 '11 at 1:42
  • $\begingroup$ @cardinal. I did the D-W test on the residuals and it shows autocorrelation so, in this case at least, ϵt in yt=βt+ϵt appears to be a nonstationary process. $\endgroup$ – paul Jul 31 '11 at 6:30
1
$\begingroup$

At a more basic level aren't you assuming that the original graph has two parts that have the same slope but different intercepts, so if you throw a linear regression through it, the regression line should share that slope and split the difference in intercepts?

This isn't true. Try using the points

x=(1, 2, 3, 4, 5, 6, 7, 8, 9, 10) and
y=(1, 2, 3, 4, 5, 16, 17, 18, 19, 20).

The two halves share the same slope (i.e. 1), but a regression through them will not share that slope (it has slope 2.515). The residuals will have a slope (trend) that is the difference between their actual slopes (which may not be the same for each half of your data) and the linear regression's slope.

$\endgroup$

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.