Solved – Difference between one-way and two-way fixed effects, and their estimation

fixed-effects-modelheterogeneitypanel data

Consider a basic linear unobserved effect panel data model, e.g.:
$$Y_{it}=\beta x'_{it}+c_i+\lambda_t+u_{it}, \quad t=1,\dots,T$$
where the vector $x_{it}$ contains the independent variables and $u_{it}$ is an error term. Number of individuals is $N$. Assume that the the unobserved individual effect $c_i$ may be correlated with $x_{it}$ (fixed effects assumption).

First question: What is the difference between a "one-way" and a "two-way" model? Wooldridge (2006 & 2010) never uses this terms. I assume a one-way model does not include time effects, e.g.:
\begin{equation}Y_{it}=\beta x'_{it}+c_i+u_{it}, \quad t=1,\dots,T \quad(1)\end{equation}
but a two-way model additionally does include time effects :
\begin{equation} Y_{it}=\beta x'_{it}+c_i+\lambda_t+u_{it}, \quad t=1,\dots,T \quad(2) \end{equation}

According to the Frisch-Waugh-Lovell theorem the within estimator and the least squares dummy variable (LSDV) estimator both yield the same coefficients for equation (1).
This leads me to my second question: How would you estimate equation (2)? Can you first include $T$ time dummies (should it be $T-1$?) and then choose between the within estimator or the LSDV estimator? This answer suggests to first use the within transformation and afterwards to estimate the model including dummy variables, what I find confusing.

References:
Wooldridge, J. M. (2006). Introductory econometrics (3rd ed.). Thomson/South-Western.
Wooldridge, J. M. (2010). Econometric analysis of cross section and panel data (2nd ed.). The MIT Press.

EDIT:
I had a look at some lecture notes (here, here and here) and it seems like two-way models include what are sometimes called "time (fixed) effects" (see $\lambda _t$ in equation (2)), as I assumed.
What I understood was that either a) a somewhat different within transformation can be applied to two-way models, or b) dummies are included for one dimension (either time or individual) and then the "normal" within transformation (subtracting means) for the other dimension is applied.
Depending on estimation procedure the standard errors have to be corrected because of different degrees of freedom. Also, procedure a) seems only to be valid for balanced panels. I haven't found a textbook reference yet.

Best Answer

The unobserved effects model is modeled as: \begin{equation} y = X\beta + u \end{equation} where \begin{equation} u = c_{i} + \lambda_{t} + v_{it} \end{equation}

A one-way error model assumes $\lambda_{t} = 0$ while a two-way error allows for $\lambda \in \mathbb{R}$ and that is the answer to the first question.

The second question cannot be answered without more assumptions about the error structure or purpose of the study. Using Wooldridge (2010) chapters 10 and 11, generalize each of the assumptions to cover the temporal error structure as well. For example, when considering POLS, the critical assumption is $\mathop{\mathbb{E}}\left(\mathbf{x}_{it}^{\prime}u\right) = 0$. In the chapter it is summarized as meeting the following conditions:

  1. $\mathop{\mathbb{E}}\left(\mathbf{x}_{it}^{\prime}c\right) = 0$
  2. $\mathop{\mathbb{E}}\left(\mathbf{x}_{it}^{\prime}v\right) = 0$

However, if one does not assume $\lambda_{t} = 0$, i.e., two-way error model, a third condition must be satisfied for consistency of the POLS estimator: \begin{equation} \mathop{\mathbb{E}}\left(\mathbf{x}_{it}^{\prime}\lambda\right) = 0 \end{equation} and so on.

In the case of estimating the fixed effects, one can go with LSDV (including indicators for the panel ID and temporal ID), but the dimension might become unfeasible fast. One alternative is to use the one-way error within estimator and include the time dummies such as one usually do with software that does not allow for two-way error models like Stata. A third and most efficient way is to estimate it with the two-way error within estimator. \begin{equation} y_{it} − \bar{y}_{i.} − \bar{y}_{.t} + \bar{y}_{..} = (x_{it} − \bar{x}_{i.} − \bar{x}_{.t} + \bar{x}_{..})\beta \end{equation} This approach is coded in several statistical packages such as the R package plm and correctly adjust the degrees of freedom to include the T - 1 additional parameters compared to the one-way error within estimator. Most two-error way model estimators are not limited to balanced panels (only a handful). For short-panels running the one-way error within estimator with time dummies is feasible. As a side note, even if one gets the estimates for the temporal effects it is important to notice that as with the LSDV fixed effects for one-way error models these are not consistent as the estimates increase in number and length of panels.

I recommend Baltagi (2013) textbook for a pretty comprehensive explanation of the estimators for one-way and two-way error models.

References:

Baltagi, Badi H. 2013. Econometric analysis of panel data. Fifth Edition. Chichester, West Sussex: John Wiley & Sons, Inc. isbn: 978-1-118-67232-7.

Croissant, Yves, and Giovanni Millo. 2008. “Panel Data Econometrics in R : The plm Package.” Journal of Statistical Software 27 (2). doi:10.18637/jss.v027.i02.

StataCorp. 2017. Stata 15 Base Reference Manual. College Station, TX: Stata Press.

Wooldridge, Jeffrey M. 2010. Econometric Analysis of Cross Section and Panel Data. Kindle Edition. The MIT Press. ISBN: 978-0-262-23258-8.