# 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.

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.