# How does one deal with trending variables in Linear Regression?

I have a linear regression model with two independent variables that takes the form: $$y_{it} = \beta_{0} + \beta_{1}x_{it} + \beta_{2}z_{it} + u_{it}$$ where $$u_{it}$$ is the error structure.

I want to know if I have data on all of $$y,x,z$$ how it would effect my estimation of the parameters if they were all increasing over time?

Context: I am running a panel regression analysis using a Fixed Effects model. All of my variables are trending all upwards. I am concerned that I will have biased results but not sure how this would enter into my model or if there are ways to account for this.

Depends on a trend. Trends come generally in two categories:

1. Deterministic trend - this can be controlled for using various methods. For example, in panel regression you could include time fixed effects that would correct for an effect of each time period on all firms and hence should control for a trend in data. This would look like this: $$y_{it} = \beta_{0} + \beta_{1}x_{it} + \beta_{2}z_{it} + \gamma_t+ u_{it}$$ Alternative approach is to just include time as separate variable $$t$$ which will be a series that will just increase by 1 in each time period this would look like this $$y_{it} = \beta_{0} + \beta_{1}x_{it} + \beta_{2}z_{it} + \beta_3 t+u_{it}$$This would control for any linear trend in the series, you could also make the trend quadratic but quadratic trends are quite rare.

2. Stochastic trends (unit root) - if there is stochastic trend in your data you generally can’t use the variable in standard regression models. You can test for presence of stochastic trend by some unit root test for example fisher test is quite popular for panel data, but it’s always context dependent. In case your variable contains unit root you can’t use it directly in most regressions but you can still transform it by taking first difference and provided the first difference does not contain stochastic trend (after you test it again) you can use the differenced variable. So in this case if all variables would contain stochastic trend you would want to run model like this: $$\Delta y_{it} = \beta_{0} + \beta_{1} \Delta x_{it} + \beta_{2}\Delta z_{it} + u_{it}$$Alternatively, sometimes variables can be cointegrated, in such case this indicates that variables tend to move together because they tend towards some long run equilibrium, you can still include them in their levels in cointegrated regression for example in panel version of fully modified OLS or other similar model, or alternatively build an error correction model where you would have both the first difference to capture short run dynamic of the model and level variables which capture the long run equilibrium.

• This is a lovely answer, but a major omitted category is when the trends are a result of a dynamic panel data generating process (as opposed to when this auto regressive root is one like in your example two). That's DGP where the Arellano–Bond estimator can be useful.
– BKay
Commented Jan 23, 2020 at 14:29
• Very succinctly put. I didn’t know these time series concepts extended to panel analysis! Commented Jan 23, 2020 at 15:31
• @Brennan yes, especially nowadays usually you see people making distinctions between panel data and panel time series data (panel data where T) is very high relative to N. Many concepts from time series analysis also carry over to panels with high T (see for example Verbeeks guide to modern econometrics or Pesaran time series and panel data econometrics). Although still many people don’t pay too much attention to this issues
– 1muflon1
Commented Jan 23, 2020 at 15:48
• This is actually kind of incomplete.
– 123
Commented Jan 23, 2020 at 20:45
• @123 my intention was not to be snappy, nor to hurt your feelings (I don’t even see how could my comment hurt anyone’s feelings even someone with thin skin), but to encourage constructive debate in the comments so OP gets more nuanced answer, if you got the feeling from my answer that I tried to snap at you then I am sorry for expressing myself in wrong way... but this being said what’s a point of just commenting it’s incomplete without saying what else would you add there?
– 1muflon1
Commented Jan 24, 2020 at 16:54