# Is it reasonable/practical to regress a variable against time?

So not doing some sort of time-series model, ex: ARIMA, is it ever reasonable to regress a variable against time using the least squares method and build a model that way? Is this something ever done in practice and if so, in what scenario?

Yes, if you think that your model is time stationary. For instance, you think that the process is: $$y_t=y_0+\beta t+\varepsilon_t$$ Look at the differences of this process: $$\Delta y_t=y_t-y_{t-1}=\beta+\varepsilon_t-\varepsilon_{t-1}$$ This may look like ARIMA(0,1,0): $$\Delta y_t=c+u_t$$

However, there is a big difference: ARIMA's error increases. Consider ARIMA error after $t$ steps: $$y_t = y_{t-1}+c+u_t = y_{t-2}+2c+u_t+u_{t-1} = y_0 + ct+\sum_{i=0}^{t-1}u_{t-i}$$ The last term is an error at time $t$ from the initial zero time. You see that its mean is ZERO, but the variance is increasing at a rate of $\sqrt t$. Contrast this to the static variance of the time stationary process that I showed in the beginning.

Hence, if you truly have time stationary process then it's better to estimate it as such, i.e. regress on time.

• what does "time" stationary mean? Is it the same concept as weak stationary we need to do time series models? – user6472523 Apr 27 '18 at 17:44
• I'm using the term loosely to say that mean is changing $E[y_t]\sim t$, but variance is not $Var[y_t|t=0]=const$ – Aksakal Apr 27 '18 at 17:50
• I see so constant variance, but mean can change. My motivation for asking this question is, of the times I've tried doing this, (which is like twice), the error terms show autocorrelation. Not sure exactly what causes this, but I know it makes the sum of squares method pointless. So I didn't know if there were actually cases where the error terms were iid. – user6472523 Apr 27 '18 at 18:00
• Autocorrelation in residuals can be dealt with regArima type of models, for my example it would be $y_t=y_0+\beta t+u_t$, where $u_t=\varepsilon_t+\varepsilon_{t-1}$ with $Var[\varepsilon_t,\varepsilon_{t-1}]=0$ – Aksakal Apr 27 '18 at 18:26

If you are interested in detecting a temporal trend in the values of an outcome variable (e.g., ozone level) based on yearly data, you can fit a simple linear regression model relating the outcome variable to the predictor variable year via ordinary least squares. The model would assume a linear effect for year as well as independence of the model errors.

Of course, you will have to check the model residuals. If the ACF and PACF plots of the residuals suggest that the assumption of independent model errors is violated, you can use a simple linear regression model with temporally dependent errors. If you are willing to assume that the errors for this model follow an AR or ARMA process, you can fit the model via generalized least squares (gls).