Model for regression when independent variable is auto-correlated I would like to make a simple regression where my dependent variable is the demand for cigarettes and my independent variable is the GDP. I have 10 sets of data. Given that the GDP values are correlated to its past values, should I adjust my model and do something more complex than just a simple regression?
 A: In order to use simple regression for time series data, you need to satisfy the following three strong assumptions regarding the residual $\varepsilon_t$:


*

*Mean of errors 0

*Errors are not autocorrelated

*Errors are unrelated to predictor variable (GDP). 


However as you said, you expect to see some autocorrelation in the data. Typically, an ACF plot of the residuals should be able to show you that or a statistical test such as Durbin-Watson. 
Additionally, if the high autocorrelation is coupled with a high $R^2$, then it is very likely you are looking at spurious regression (both variables have a time trend, which makes them appear to be correlated). 
If that is the case, the next modeling choice is a regression with ARIMA errors. In this case we would write. 
$$
y_t = \beta_0 + \beta_1x_t + n_t
$$
Note that I replaced $\varepsilon_t$ with $n_t$. The reason is because is residual is not white noise anymore and has to be modeled as well. For example an ARIMA (1,1,1) model for residuals would look like: 
$$
(1-\phi_1B)(1-B)n_t=(1+\theta_1B)\varepsilon_t
$$
where $\varepsilon_t$ is now an uncorrelated residual with mean zero (white noise). 
Now minimizing the sum of squares of $\varepsilon_t$ will give us the correct estimate. (Regular regression would instead minimize sum of squares of $n_t$). I will not go into the details of how that is calculated. However for a quick test you can use the auto.arima() function in R from the forecast package. 
In this case a simple implementation would be: 
fitmodel = auto.arima(y=demand, xreg=gdp)
The function is very well documented in R.
