<p>Depends on a trend. Trends come generally in two categories:</p>

<ol>
<li><p><strong>Deterministic trend</strong> - 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: <span class="math-container">$$y_{it} = \beta_{0} + \beta_{1}x_{it} + \beta_{2}z_{it} + \gamma_t+ u_{it}$$</span> Alternative approach is to just include time as separate variable <span class="math-container">$t$</span> which will be a series that will just increase by 1 in each time period this would look like this <span class="math-container">$$y_{it} = \beta_{0} + \beta_{1}x_{it} + \beta_{2}z_{it} + \beta_3 t+u_{it}$$</span>This would control for any linear trend in the series, you could also make the trend quadratic but quadratic trends are quite rare.</p></li>
<li><p><strong>Stochastic trends (unit root)</strong> - 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: <span class="math-container">$$\Delta y_{it} = \beta_{0} + \beta_{1} \Delta x_{it} + \beta_{2}\Delta z_{it} + u_{it}$$</span>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.</p></li>
</ol>

CC BY-SA 4.0
2020-01-23T14:29:21.560Z
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
CC BY-SA 4.0
2020-01-23T15:31:51.593Z
Very succinctly put. I didn’t know these time series concepts extended to panel analysis!
Brennan
CC BY-SA 4.0
2020-01-23T15:48:08.713Z
@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
CC BY-SA 4.0
2020-01-23T20:45:39.630Z
This is actually kind of incomplete.
123
CC BY-SA 4.0
2020-01-23T20:59:21.597Z
@123 well it’s definitely not exhaustive answer - that’s not what I was even going for, you could maybe add to it in the comment like Bkay instead of just saying it’s incomplete
1muflon1
CC BY-SA 4.0
2020-01-24T05:30:07.497Z
$\gamma_t$ is popular; $\beta_3 t$ is seldom used; an alternative is $\beta_{3i} t$ (incidental linear trends), which can lead to the difference model, but the difference model is different from the levels model from the beginning. Interactive fixed models can also be considered. (I presume fixed effects are there though not written.)
chan1142
CC BY-SA 4.0
2020-01-24T16:46:59.530Z
@1muflon1 awe. So snappy. You've really hurt my feelings.
123
CC BY-SA 4.0
2020-01-24T16:54:35.370Z
@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
CC BY-SA 4.0
2020-01-23T07:48:56.287Z
2020-01-23T07:48:56.287Z
1muflon1
<p>I have a linear regression model with two independent variables that takes the form:
<span class="math-container">$$y_{it} = \beta_{0} + \beta_{1}x_{it} + \beta_{2}z_{it} + u_{it}$$</span>
where <span class="math-container">$u_{it}$</span> is the error structure. </p>

<p>I want to know if I have data on all of <span class="math-container">$y,x,z$</span> how it would effect my estimation of the parameters if they were all increasing over time?</p>

<p>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.</p>

<econometrics><applied-econometrics>
How does one deal with trending variables in Linear Regression?
Brennan
# How does one deal with trending variables in Linear Regression?

(Asked by: username_0 on 2020-01-23)

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.

**Tags:** econometrics, applied-econometrics


---

## 1 answers

### Answer by username_1 on 2020-01-23. Score: 4 | Accepted answer

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.

> **Comments:**
> **username_2**: 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.  
> **username_0**: Very succinctly put. I didn’t know these time series concepts extended to panel analysis!  
> **username_1**: @username_0 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  
> **username_3**: This is actually kind of incomplete.  
> **username_1**: @username_3 well it’s definitely not exhaustive answer - that’s not what I was even going for, you could maybe add to it in the comment like Bkay instead of just saying it’s incomplete  
> **username_4**: $\gamma_t$ is popular; $\beta_3 t$ is seldom used; an alternative is $\beta_{3i} t$ (incidental linear trends), which can lead to the difference model, but the difference model is different from the levels model from the beginning. Interactive fixed models can also be considered. (I presume fixed effects are there though not written.)  
> **username_3**: @username_1 awe. So snappy. You've really hurt my feelings.  
> **username_1**: @username_3 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?  

---

