Solved – How to model a linear regression based on time

regressiontime series

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

Best Answer

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.

Related Question