# Differencing estimator in two-way fixed effects model

Consider a simple linear panel regression model with two-way fixed effects: $$Y_{it}=\alpha_i+\mu_t+X_{it}'\beta+u_{it}, \quad i=1,...,n, \ t=1,...,T,$$ where $$n$$ and $$T$$ represent the total units in individual and time dimensions, respectively. Variables $$\alpha_i$$ and $$\mu_t$$ are unobserved individual and time effects, respectively, which are correlated with (time variant) regressors $$X_{it}\in \mathcal{R}^p$$. The random noise $$u_{it}$$ satisfies $$E(u_{it}|\alpha_i,\mu_t,X_{it})=0$$. When both $$n$$ and $$T$$ are large, the least square dummy variable approach becomes infeasible for a consistent estimator of $$\beta$$. One popular method is the demean approach that wipes out $$\alpha_i$$ and $$\mu_t$$.

Question: If we instead use differencing estimator, can the estimator for $$\beta$$ be still consistent? Namely, we perform differencing on both sides of the model above to have $$\ddot{\Delta}Y_{it}=\ddot{\Delta}X_{it}'\beta+\ddot{\Delta}u_{it}, \quad i=2,...,n, \ t=2,...,T,$$ where $$\ddot{\Delta}Y_{it}=Y_{it}-Y_{i,t-1}-Y_{i-1,t}+Y_{i-1,t-1}$$ and similarly for $$\ddot{\Delta}X_{it}$$ and $$\ddot{\Delta}u_{it}$$. I am sure that the $$\beta$$ can be estimated through OLS if we assume $$E(\ddot{\Delta}u_{it}|\alpha_i,\mu_t,X_{it})=0.$$

However, in such differencing process, $$Y_{i-1,t}$$ is not uniquely defined, because the order of $$i=1,...,n$$ can be arbitrary. For instance, if $$i=3$$ stands for the U.S., then $$i-1=2$$ can be any other country in a dataset, like China or Canada. I am not sure if this is a problem for the differencing estimator. I found no closed reference from the literature, so any help would be appreciated.

Thanks.

The extension of the first differencing for one-way fixed effect to two-way fixed effects involves variables observed at $$i-1$$. Since the order of $$i=1,...,n$$ is trivial, the estimates given a sample can be different with different orders of $$i$$. In other words, there will be $$n!$$ different choices of the order, which can be huge in application.

Here, I propose to revise the differencing transformation $$\ddot\Delta Y_{it}$$ as $$\ddot\Delta Y_{it}=Y_{it}-Y_{i,t-1}-Y_{1,t}+Y_{1,t-1},$$ where the variables at $$i-1$$ in the original post is now replaced by the first individual at $$t$$ and $$t-1$$, i.e., $$Y_{1,t}$$ and $$Y_{1,t-1}.$$ While the decision of who is going to be the first individual is an open question, it decreases the number of the order choice from $$n!$$ to $$n$$. Through a simulation, I observe that the difference of the estimate given a total of $$n$$ different choice of the first individual is reasonably small, and vanishes as sample size rises.

Any other thoughts are very welcome.

When you difference you throw away your first observation, I think you acknowledge this by letting your differenced model start with T=2,3,...,T. However you also set i=2,3,...,N , this is unusual, you throw away your first observation from a time perspective, this is because you do a time difference operation delta on your data Y. The set of entities i in your differenced data should be the exact same as those you start out with, the time differencing has no impact on your entities i. Hope this makes sense. Maybe I misunderstand you, because the way you phrase your differenced model is unusual to me, typically we represent the differenced model as $$\Delta Y_{i,t}=\Delta X_{i,t}'\beta+ \Delta u_{i,t}$$.

• Thank you for your reply. Yes, for the first differenced model with only one fixed effect (i.e., $\mu_t=0$), you difference out $\alpha_i$ by performing difference on data, such as $Y_{it}-Y_{i,t-1}$. When two fixed effects present in the model that are correlated with regressors, we need to eliminate both to avoid incidental parameter problems. That is what I denoted above, which involves $Y_{i-1,t}$ and $Y_{i-1,t-1}$. In SAS, this method is implemented for linear panel regression model with two-way fixed effects, but I found no closed references.
– Rico
Aug 2, 2021 at 1:51
• Ok I understand now, you want to know if differencing trick in both dimensions N and T will work for obtaining consistent estimator. Interesting question, if I google I only see demeaning estimators. Maybe you answered your question yourself by pointing out that the difference wrt a non-ordered variable has no meaning. I would love to hear what someone else has to say, and maybe I will investigate further later if I have time. Nice question Aug 2, 2021 at 10:06
• Yes, your understanding is totally right. I don't know and I can only google out limited answers. Most textbook focuses on the demean case. Interestingly, as far as I know, SAS provides such method in their software for panel model with two-way fixed effects, but does not give reference. My guess is that the order of $i=1,...,n$ creates estimation differences in a finite sample, but it can be still consistent as sample size becomes sufficiently large. In other words, the variance of the estimate given different order of $i=1,...,n$ becomes smaller as $n$ goes to infinity.
– Rico
Aug 2, 2021 at 11:53