I have some training set data variables $x_1$, $x_2$, $x_3$, $x_4$, and $x_5$ and a response variable $y$. But these are time series data. So the for the same set of values of $x_1$, $x_2$, $x_3$, $x_4$, and $x_5$ the response variable $y$ may be different in different observations. Can anyone please suggest me how to model my linear regression in this case? I am learning newly statistics. Please explain in the simplest way possible.

I am uploading a picture explaining the same question for more clarity enter image description here

  • $\begingroup$ If I understand correctly, the difference in the dependent variable $y$ may depend: 1) on another variable $x_6$ you didn't detect (it may be the time); 2) on random errors. Which may be your case? $\endgroup$
    – Libra
    Sep 3, 2012 at 20:53
  • 1
    $\begingroup$ What is it that you want to test? $\endgroup$
    – user13253
    Sep 8, 2012 at 10:35

1 Answer 1


If your aim is to "detrend" the data (i.e., remove the "time dependent" component from your estimates), you can estimate the model as

$Y = \alpha + \beta t + \gamma_i X_i + \epsilon$

Where the $\beta t$ term captures your linear time variance and the $\gamma_i$ terms capture the marginal effect of your $X_i$s, assuming all your other modelling assumptions hold.

The time component in your data is referred to as "non-stationarity" and there is a whole literature on dealing with this sort of time-series analysis. The above is perhaps the simplest model you could suggest, however embodied in it is a huge set of assumptions about the state of your data generating process.


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.