0

I am quite new to regression analysis and am using python's statsmodels. My dataset is a time-series, which consists of values of a variable recorded for a long period, 1990 - 2020.

I am interested to see whether the variation over time shows significantly increasing or decreasing trend or there is no trend. I am aware of other methods of trend analysis for time series. However, I choose OLS method in python statsmodels to find the regression of my variable on time.

After running the OLS model for the time series, I found the following:enter image description here

Problems:

  1. Here I see the intercept value [const] (red circled) is very large negative and meaningless. It makes sense because I have data from the year 1990 onwards. Given the data set, going back to zero values of independent variable time, here, i. e. year = 0 may result in such a large negative value of the intercept.

  2. Condition number is too large also.

Is there some way so that the intercept value would be meaningful?

Nick Cox
  • 48,377
  • 8
  • 110
  • 156
  • This is a common problem, but in my experience not often documented in textbooks or introductory courses because the writer or teacher thinks that the solution is obvious. (It is once you have thought of it.) I would here re-run the regression on year $-$ 2000, so that the intercept has meaning as the value predicted for year 2000. Or use any other convenient origin. In fact very many regressions benefit from scaling predictors so that the intercept is in Tukey's inimitable vocabulary a "centercept" (centrecept, if you prefer). – Nick Cox Jun 05 '21 at 09:16
  • The intercept is not meaningless. As always, it is the value predicted by your regression when all predictors are zero. That you would (rightly) prefer a value closer to your thinking about the dataset is in your hands, and the problem is not to be blamed on regression or your software. (Any other software would do the same thing, so far as I know; there may be software specifically for time series that automatically chooses a different origin for you.) – Nick Cox Jun 05 '21 at 09:23
  • 1
    @NickCox .. thanks a lot for nice and convincing explanation of the problem. The resources you have provided is very much useful. Yeah, I was wrong to say the intercept meaningless. I realize it now. Thanks a lot again. – Peshal1067 Jun 05 '21 at 09:51

0 Answers0