Skip to main content
changed notation, changed title
Source Link
luchonacho
  • 2.7k
  • 5
  • 26
  • 47

Why FE cannot estimate all region-year dummies? Fixed effects estimates different number of parameters with different datasets

Consider a simple panel data model of wage determination, with two periods, and only one regressor: a dummy of whether individual lives in urban or rural area. Importantly, individuals can switch location between periods. $U$ is urban, $R$ is rural. $1$ is year 1, $2$ is year 2, $i$ is individual, and $t \in \{1,2\}$. The model is:

$$ w_{i,t} = \alpha + \beta U1_{i,t} + \gamma U2_{i,t} + \phi R1_{i,t} + \theta R2_{i,t} + \epsilon_{i,t} $$

where $Ut_{i,t}$ and $Rt_{i,t}$ are dummy stating whether individual $i$ is in rural/urban in period $t$. (Note: I add all categories just for clarification. Naturally, the four of them are collinear with the constant).

For example, the data matrix might look like this:

$$ \begin{array}{cc|cccc} i & t & \text{constant} & U1_{i,t} & U2_{i,t} & R1_{i,t} & R2_{i,t} \\ \hline 1 & 1 & 1 & 1 & 0 & 0 & 0 \\ 1 & 2 & 1 & 0 & 1 & 0 & 0 \\ 2 & 1 & 1 & 1 & 0 & 0 & 0 \\ 2 & 2 & 1 & 0 & 0 & 0 & 1 \end{array} $$

Individual 1 remains in urban in both periods, whether individual 2 switches from urban to rural.

I am estimating a model like this using fixed-effects. The issue is the following:

  • If the dataset has switchers, the software returns an estimation for four out of fivefour out of five of the model parameters ($\alpha, \beta, \gamma, \phi, \theta$) - four only because of the constant.
  • If the dataset has no switchers, the software returns an estimation for three out of fivethree out of five of the model parameters. Of these, at least one is of urban and of rural type.

I am trying to understand this parameter estimation difference. I have been through formulas and matrix algebra, textbooks and google, and so far I cannot resolve this. Now I want your help!

Further information:

  • This estimation pattern does not follow through in random-effects. Regardless of whether switching exists or not, RE identifies the same number of coefficients. Thus, the result is necessarily due to a combination of switching and the intrinsic demeaning nature of FE.
  • I've tried in different software and commands, and the result holds.
  • Identification of all coefficients (but one) requires full rank of matrix $\sum_{i=1}^{N}(\ddot{X_{i}}'\ddot{X_{i}})$, where $\ddot{X_{i}}$ is the demeaned data matrix for individual $i$ (Wooldridge (2010), p.304). According to my calculations, if there are no switchers, that matrix is a diagonal, with element $(1,1)=NT$, and all rest diagonal elements equal to $N_{u/r}\frac{T-1}{T}$, where $N_{u/r}$ is the number of individuals on each region. I cannot see how that matrix has no full rank, and so cannot see why all coefficients are not calculated. For example, in the case of individual 1 above, $\ddot{X_{i}}$ is:

$$ \begin{array}{ccccc} 1 & 0.5 & -0.5 & 0 & 0 \\ 1 & -0.5 & 0.5 & 0 & 0 \end{array} $$

and $\ddot{X_{i}}'\ddot{X_{i}}$ is:

$$ \begin{array}{ccccc} 2 & 0 & 0 & 0 & 0 \\ 0 & 0.5 & 0 & 0 & 0 \\ 0 & 0 & 0.5 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \end{array} $$

Combined with another non-switcher who lives in a rural area, the sum is:

$$ \begin{array}{ccccc} 4 & 0 & 0 & 0 & 0 \\ 0 & 0.5 & 0 & 0 & 0 \\ 0 & 0 & 0.5 & 0 & 0 \\ 0 & 0 & 0 & 0.5 & 0 \\ 0 & 0 & 0 & 0 & 0.5 \end{array} $$

Which clearly has full rank. And so on. So why are not all coefficients estimated?

Why FE cannot estimate all region-year dummies?

Consider a simple panel data model of wage determination, with two periods, and only one regressor: a dummy of whether individual lives in urban or rural area. Importantly, individuals can switch location between periods. $U$ is urban, $R$ is rural. $1$ is year 1, $2$ is year 2, $i$ is individual, and $t \in \{1,2\}$. The model is:

$$ w_{i,t} = \alpha + \beta U1_{i,t} + \gamma U2_{i,t} + \phi R1_{i,t} + \theta R2_{i,t} + \epsilon_{i,t} $$

where $Ut_{i,t}$ and $Rt_{i,t}$ are dummy stating whether individual $i$ is in rural/urban in period $t$. (Note: I add all categories just for clarification. Naturally, the four of them are collinear with the constant).

For example, the data matrix might look like this:

$$ \begin{array}{cc|cccc} i & t & \text{constant} & U1_{i,t} & U2_{i,t} & R1_{i,t} & R2_{i,t} \\ \hline 1 & 1 & 1 & 1 & 0 & 0 & 0 \\ 1 & 2 & 1 & 0 & 1 & 0 & 0 \\ 2 & 1 & 1 & 1 & 0 & 0 & 0 \\ 2 & 2 & 1 & 0 & 0 & 0 & 1 \end{array} $$

Individual 1 remains in urban in both periods, whether individual 2 switches from urban to rural.

I am estimating a model like this using fixed-effects. The issue is the following:

  • If the dataset has switchers, the software returns an estimation for four out of five of the model parameters ($\alpha, \beta, \gamma, \phi, \theta$) - four only because of the constant.
  • If the dataset has no switchers, the software returns an estimation for three out of five of the model parameters. Of these, at least one is of urban and of rural.

I am trying to understand this parameter estimation difference. I have been through formulas and matrix algebra, textbooks and google, and so far I cannot resolve this. Now I want your help!

Further information:

  • This estimation pattern does not follow through in random-effects. Regardless of whether switching exists or not, RE identifies the same number of coefficients. Thus, the result is necessarily due to a combination of switching and the intrinsic demeaning nature of FE.
  • I've tried in different software and commands, and the result holds.
  • Identification of all coefficients (but one) requires full rank of matrix $\sum_{i=1}^{N}(\ddot{X_{i}}'\ddot{X_{i}})$, where $\ddot{X_{i}}$ is the demeaned data matrix for individual $i$ (Wooldridge (2010), p.304). According to my calculations, if there are no switchers, that matrix is a diagonal, with element $(1,1)=NT$, and all rest diagonal elements equal to $N_{u/r}\frac{T-1}{T}$, where $N_{u/r}$ is the number of individuals on each region. I cannot see how that matrix has no full rank, and so cannot see why all coefficients are not calculated. For example, in the case of individual 1 above, $\ddot{X_{i}}$ is:

$$ \begin{array}{ccccc} 1 & 0.5 & -0.5 & 0 & 0 \\ 1 & -0.5 & 0.5 & 0 & 0 \end{array} $$

and $\ddot{X_{i}}'\ddot{X_{i}}$ is:

$$ \begin{array}{ccccc} 2 & 0 & 0 & 0 & 0 \\ 0 & 0.5 & 0 & 0 & 0 \\ 0 & 0 & 0.5 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \end{array} $$

Combined with another non-switcher who lives in a rural area, the sum is:

$$ \begin{array}{ccccc} 4 & 0 & 0 & 0 & 0 \\ 0 & 0.5 & 0 & 0 & 0 \\ 0 & 0 & 0.5 & 0 & 0 \\ 0 & 0 & 0 & 0.5 & 0 \\ 0 & 0 & 0 & 0 & 0.5 \end{array} $$

Which clearly has full rank. And so on. So why are not all coefficients estimated?

Fixed effects estimates different number of parameters with different datasets

Consider a simple panel data model of wage determination, with two periods, and only one regressor: a dummy of whether individual lives in urban or rural area. Importantly, individuals can switch location between periods. $U$ is urban, $R$ is rural. $1$ is year 1, $2$ is year 2, $i$ is individual, and $t \in \{1,2\}$. The model is:

$$ w_{i,t} = \alpha + \beta U1_{i,t} + \gamma U2_{i,t} + \phi R1_{i,t} + \theta R2_{i,t} + \epsilon_{i,t} $$

where $Ut_{i,t}$ and $Rt_{i,t}$ are dummy stating whether individual $i$ is in rural/urban in period $t$. (Note: I add all categories just for clarification. Naturally, the four of them are collinear with the constant).

For example, the data matrix might look like this:

$$ \begin{array}{cc|cccc} i & t & \text{constant} & U1_{i,t} & U2_{i,t} & R1_{i,t} & R2_{i,t} \\ \hline 1 & 1 & 1 & 1 & 0 & 0 & 0 \\ 1 & 2 & 1 & 0 & 1 & 0 & 0 \\ 2 & 1 & 1 & 1 & 0 & 0 & 0 \\ 2 & 2 & 1 & 0 & 0 & 0 & 1 \end{array} $$

Individual 1 remains in urban in both periods, whether individual 2 switches from urban to rural.

I am estimating a model like this using fixed-effects. The issue is the following:

  • If the dataset has switchers, the software returns an estimation for four out of five of the model parameters ($\alpha, \beta, \gamma, \phi, \theta$) - four only because of the constant.
  • If the dataset has no switchers, the software returns an estimation for three out of five of the model parameters. Of these, at least one is of urban and of rural type.

I am trying to understand this parameter estimation difference. I have been through formulas and matrix algebra, textbooks and google, and so far I cannot resolve this. Now I want your help!

Further information:

  • This estimation pattern does not follow through in random-effects. Regardless of whether switching exists or not, RE identifies the same number of coefficients. Thus, the result is necessarily due to a combination of switching and the intrinsic demeaning nature of FE.
  • I've tried in different software and commands, and the result holds.
  • Identification of all coefficients (but one) requires full rank of matrix $\sum_{i=1}^{N}(\ddot{X_{i}}'\ddot{X_{i}})$, where $\ddot{X_{i}}$ is the demeaned data matrix for individual $i$ (Wooldridge (2010), p.304). According to my calculations, if there are no switchers, that matrix is a diagonal, with element $(1,1)=NT$, and all rest diagonal elements equal to $N_{u/r}\frac{T-1}{T}$, where $N_{u/r}$ is the number of individuals on each region. I cannot see how that matrix has no full rank, and so cannot see why all coefficients are not calculated. For example, in the case of individual 1 above, $\ddot{X_{i}}$ is:

$$ \begin{array}{ccccc} 1 & 0.5 & -0.5 & 0 & 0 \\ 1 & -0.5 & 0.5 & 0 & 0 \end{array} $$

and $\ddot{X_{i}}'\ddot{X_{i}}$ is:

$$ \begin{array}{ccccc} 2 & 0 & 0 & 0 & 0 \\ 0 & 0.5 & 0 & 0 & 0 \\ 0 & 0 & 0.5 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \end{array} $$

Combined with another non-switcher who lives in a rural area, the sum is:

$$ \begin{array}{ccccc} 4 & 0 & 0 & 0 & 0 \\ 0 & 0.5 & 0 & 0 & 0 \\ 0 & 0 & 0.5 & 0 & 0 \\ 0 & 0 & 0 & 0.5 & 0 \\ 0 & 0 & 0 & 0 & 0.5 \end{array} $$

Which clearly has full rank. And so on. So why are not all coefficients estimated?

changed notation
Source Link
luchonacho
  • 2.7k
  • 5
  • 26
  • 47

Consider a simple panel data model of wage determination, with two periods, and only one regressor: a dummy of whether individual lives in urban or rural area. Importantly, individuals can changeswitch location between periods. $u$$U$ is urban, $r$$R$ is rural. $1$ is year 1, $2$ is year 2, and $i$ is individual, and $t \in \{1,2\}$. The model is:

$$ w_{it} = \alpha + \beta_{u,1} D_{i,u,1} + \beta_{u,2} D_{i,u,2} + \beta_{r,1} D_{i,r,1} + \beta_{r,2} D_{i,r,2} + \epsilon_{it} $$$$ w_{i,t} = \alpha + \beta U1_{i,t} + \gamma U2_{i,t} + \phi R1_{i,t} + \theta R2_{i,t} + \epsilon_{i,t} $$

where $D_{i,u/r,t}$ is the$Ut_{i,t}$ and $Rt_{i,t}$ are dummy stating whether individual $i$ is in rural/urban in period $t$. (Note: I add all categories just for clarification. Naturally, theythe four of them are fully collinear with the constant).

For example, the data matrix might look like this:

$$ \begin{array}{c|ccccc} i & t & \text{constant} & D_{i,u,1} & D_{i,u,2} & D_{i,r,1} & D_{i,r,2} \\ \hline 1 & 1 & 1 & 1 & 0 & 0 & 0 \\ 1 & 2 & 1 & 0 & 1 & 0 & 0 \\ 2 & 1 & 1 & 1 & 0 & 0 & 0 \\ 2 & 2 & 1 & 0 & 0 & 0 & 1 \end{array} $$$$ \begin{array}{cc|cccc} i & t & \text{constant} & U1_{i,t} & U2_{i,t} & R1_{i,t} & R2_{i,t} \\ \hline 1 & 1 & 1 & 1 & 0 & 0 & 0 \\ 1 & 2 & 1 & 0 & 1 & 0 & 0 \\ 2 & 1 & 1 & 1 & 0 & 0 & 0 \\ 2 & 2 & 1 & 0 & 0 & 0 & 1 \end{array} $$

Individual 1 remains in urban in both periods, whether individual 2 switchesswitches from urban to rural.

I am estimating a model like this using fixed-effects. The factissue is the following:

  • If the dataset has switchers, the software returns an estimation for eachfour out of $\beta_{u/r,t}$five of the model parameters (except one$\alpha, \beta, \gamma, \phi, \theta$) - four only because of course, if the constant is included; if not included, it return a coefficient for all of them).
  • If the dataset has no switchers, the software returns only an estimation of one coefficient for each region typean estimation for three out of five of the model parameters. This isOf these, it returnat least one for rural and foris of urban. In other words, the wage rates for each region are normalized to a common base (the constant) and of rural.

I am trying to understand why switchers generate athis parameter estimation difference result. I have been through formulas and matrix algebra, textbooks and google, and so far I cannot resolve this. Now I want your help!

Further information:

  • This behaviourestimation pattern does not follow through in random-effects. Regardless of whether switching exists or not, RE can identify allidentifies the same number of coefficients. Thus, the result is necessarily due to a combination of switching and the intrinsic demeaning nature of FE.
  • I've tried in different software and commands, and the result holds.
  • Identification of all coefficients (but one) requires full rank of matrix $\sum_{i=1}^{N}(\ddot{X_{i}}'\ddot{X_{i}})$, where $\ddot{X_{i}}$ is the demeaned data matrix for individual $i$ (Wooldridge (2010), p.304). According to my calculations, if there are no switchers, that matrix is a diagonal, with element $(1,1)=NT$, and all rest diagonal elements equal to $N_{u/r}\frac{T-1}{T}$, where $N_{u/r}$ is the number of individuals on each region. I cannot see how that matrix has no full rank, and so cannot see why all coefficients are not calculated. For example, in the case of individual 1 above, $\ddot{X_{i}}$ is:

$$ \begin{array}{ccccc} 1 & 0.5 & -0.5 & 0 & 0 \\ 1 & -0.5 & 0.5 & 0 & 0 \end{array} $$

and $\ddot{X_{i}}'\ddot{X_{i}}$ is:

$$ \begin{array}{ccccc} 2 & 0 & 0 & 0 & 0 \\ 0 & 0.5 & 0 & 0 & 0 \\ 0 & 0 & 0.5 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \end{array} $$

Combined with another non-switcher who lives in a rural area, the sum is:

$$ \begin{array}{ccccc} 4 & 0 & 0 & 0 & 0 \\ 0 & 0.5 & 0 & 0 & 0 \\ 0 & 0 & 0.5 & 0 & 0 \\ 0 & 0 & 0 & 0.5 & 0 \\ 0 & 0 & 0 & 0 & 0.5 \end{array} $$

Which clearly has full rank. And so on. So why are not all coefficients estimated?

Consider a simple panel data model of wage determination, with two periods, and only one regressor: a dummy of whether individual lives in urban or rural area. Importantly, individuals can change location between periods. $u$ is urban, $r$ is rural. $1$ is year 1, $2$ is year 2, and $i$ is individual. The model is:

$$ w_{it} = \alpha + \beta_{u,1} D_{i,u,1} + \beta_{u,2} D_{i,u,2} + \beta_{r,1} D_{i,r,1} + \beta_{r,2} D_{i,r,2} + \epsilon_{it} $$

where $D_{i,u/r,t}$ is the dummy stating whether individual $i$ is in rural/urban in period $t$. (Note: I add all categories just for clarification. Naturally, they are fully collinear).

For example, the data matrix might look like this:

$$ \begin{array}{c|ccccc} i & t & \text{constant} & D_{i,u,1} & D_{i,u,2} & D_{i,r,1} & D_{i,r,2} \\ \hline 1 & 1 & 1 & 1 & 0 & 0 & 0 \\ 1 & 2 & 1 & 0 & 1 & 0 & 0 \\ 2 & 1 & 1 & 1 & 0 & 0 & 0 \\ 2 & 2 & 1 & 0 & 0 & 0 & 1 \end{array} $$

Individual 1 remains in urban in both periods, whether individual 2 switches from urban to rural.

I am estimating a model like this using fixed-effects. The fact is the following:

  • If the dataset has switchers, the software returns an estimation for each of $\beta_{u/r,t}$ (except one of course, if the constant is included; if not included, it return a coefficient for all of them).
  • If the dataset has no switchers, the software returns only an estimation of one coefficient for each region type. This is, it return one for rural and for urban. In other words, the wage rates for each region are normalized to a common base (the constant).

I am trying to understand why switchers generate a difference result. I have been through formulas and matrix algebra, textbooks and google, and so far I cannot resolve this. Now I want your help!

Further information:

  • This behaviour does not follow through in random-effects. Regardless of whether switching exists or not, RE can identify all coefficients. Thus, the result is necessarily due to a combination of switching and the intrinsic demeaning nature of FE.
  • I've tried in different software and commands, and the result holds.
  • Identification of all coefficients (but one) requires full rank of matrix $\sum_{i=1}^{N}(\ddot{X_{i}}'\ddot{X_{i}})$, where $\ddot{X_{i}}$ is the demeaned data matrix for individual $i$ (Wooldridge (2010), p.304). According to my calculations, if there are no switchers, that matrix is a diagonal, with element $(1,1)=NT$, and all rest diagonal elements equal to $N_{u/r}\frac{T-1}{T}$, where $N_{u/r}$ is the number of individuals on each region. I cannot see how that matrix has no full rank, and so cannot see why all coefficients are not calculated. For example, in the case of individual 1 above, $\ddot{X_{i}}$ is:

$$ \begin{array}{ccccc} 1 & 0.5 & -0.5 & 0 & 0 \\ 1 & -0.5 & 0.5 & 0 & 0 \end{array} $$

and $\ddot{X_{i}}'\ddot{X_{i}}$ is:

$$ \begin{array}{ccccc} 2 & 0 & 0 & 0 & 0 \\ 0 & 0.5 & 0 & 0 & 0 \\ 0 & 0 & 0.5 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \end{array} $$

Combined with another non-switcher who lives in a rural area, the sum is:

$$ \begin{array}{ccccc} 4 & 0 & 0 & 0 & 0 \\ 0 & 0.5 & 0 & 0 & 0 \\ 0 & 0 & 0.5 & 0 & 0 \\ 0 & 0 & 0 & 0.5 & 0 \\ 0 & 0 & 0 & 0 & 0.5 \end{array} $$

Which clearly has full rank. And so on. So why are not all coefficients estimated?

Consider a simple panel data model of wage determination, with two periods, and only one regressor: a dummy of whether individual lives in urban or rural area. Importantly, individuals can switch location between periods. $U$ is urban, $R$ is rural. $1$ is year 1, $2$ is year 2, $i$ is individual, and $t \in \{1,2\}$. The model is:

$$ w_{i,t} = \alpha + \beta U1_{i,t} + \gamma U2_{i,t} + \phi R1_{i,t} + \theta R2_{i,t} + \epsilon_{i,t} $$

where $Ut_{i,t}$ and $Rt_{i,t}$ are dummy stating whether individual $i$ is in rural/urban in period $t$. (Note: I add all categories just for clarification. Naturally, the four of them are collinear with the constant).

For example, the data matrix might look like this:

$$ \begin{array}{cc|cccc} i & t & \text{constant} & U1_{i,t} & U2_{i,t} & R1_{i,t} & R2_{i,t} \\ \hline 1 & 1 & 1 & 1 & 0 & 0 & 0 \\ 1 & 2 & 1 & 0 & 1 & 0 & 0 \\ 2 & 1 & 1 & 1 & 0 & 0 & 0 \\ 2 & 2 & 1 & 0 & 0 & 0 & 1 \end{array} $$

Individual 1 remains in urban in both periods, whether individual 2 switches from urban to rural.

I am estimating a model like this using fixed-effects. The issue is the following:

  • If the dataset has switchers, the software returns an estimation for four out of five of the model parameters ($\alpha, \beta, \gamma, \phi, \theta$) - four only because of the constant.
  • If the dataset has no switchers, the software returns an estimation for three out of five of the model parameters. Of these, at least one is of urban and of rural.

I am trying to understand this parameter estimation difference. I have been through formulas and matrix algebra, textbooks and google, and so far I cannot resolve this. Now I want your help!

Further information:

  • This estimation pattern does not follow through in random-effects. Regardless of whether switching exists or not, RE identifies the same number of coefficients. Thus, the result is necessarily due to a combination of switching and the intrinsic demeaning nature of FE.
  • I've tried in different software and commands, and the result holds.
  • Identification of all coefficients (but one) requires full rank of matrix $\sum_{i=1}^{N}(\ddot{X_{i}}'\ddot{X_{i}})$, where $\ddot{X_{i}}$ is the demeaned data matrix for individual $i$ (Wooldridge (2010), p.304). According to my calculations, if there are no switchers, that matrix is a diagonal, with element $(1,1)=NT$, and all rest diagonal elements equal to $N_{u/r}\frac{T-1}{T}$, where $N_{u/r}$ is the number of individuals on each region. I cannot see how that matrix has no full rank, and so cannot see why all coefficients are not calculated. For example, in the case of individual 1 above, $\ddot{X_{i}}$ is:

$$ \begin{array}{ccccc} 1 & 0.5 & -0.5 & 0 & 0 \\ 1 & -0.5 & 0.5 & 0 & 0 \end{array} $$

and $\ddot{X_{i}}'\ddot{X_{i}}$ is:

$$ \begin{array}{ccccc} 2 & 0 & 0 & 0 & 0 \\ 0 & 0.5 & 0 & 0 & 0 \\ 0 & 0 & 0.5 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \end{array} $$

Combined with another non-switcher who lives in a rural area, the sum is:

$$ \begin{array}{ccccc} 4 & 0 & 0 & 0 & 0 \\ 0 & 0.5 & 0 & 0 & 0 \\ 0 & 0 & 0.5 & 0 & 0 \\ 0 & 0 & 0 & 0.5 & 0 \\ 0 & 0 & 0 & 0 & 0.5 \end{array} $$

Which clearly has full rank. And so on. So why are not all coefficients estimated?

added 2 characters in body
Source Link
luchonacho
  • 2.7k
  • 5
  • 26
  • 47

Consider a simple panel data model of wage determination, with two periods, and only one regressor: a dummy of whether individual lives in urban or rural area. Importantly, individuals can change location between periods. $u$ is urban, $r$ is rural. $1$ is year 1, $2$ is year 2, and $i$ is individual. The model is:

$$ w_{it} = \alpha + \beta_{u,1} D_{i,u,1} + \beta_{u,2} D_{i,u,2} + \beta_{r,1} D_{i,r,1} + \beta_{r,2} D_{i,r,2} + \epsilon_{it} $$

where $D_{i,u/r,t}$ is the dummy stating whether individual $i$ is in rural/urban in period $t$. (Note: I add all categories just for clarification. Naturally, they are fully collinear).

For example, the data matrix might look like this:

$$ \begin{array}{c|ccccc} i & t & \text{constant} & D_{i,u,1} & D_{i,u,2} & D_{i,r,1} & D_{i,r,2} \\ \hline 1 & 1 & 1 & 1 & 0 & 0 & 0 \\ 1 & 2 & 1 & 0 & 1 & 0 & 0 \\ 2 & 1 & 1 & 1 & 0 & 0 & 0 \\ 2 & 2 & 1 & 0 & 0 & 0 & 1 \end{array} $$

Individual 1 remains in urban in both periods, whether individual 2 switches from urban to rural.

I am estimating a model like this using fixed-effects. The fact is the following:

  • If the dataset has switchers, the software returns an estimation for each of $\beta_{u/r,t}$ (except one of course, if the constant is included; if not included, it return a coefficient for all of them).
  • If the dataset has no switchers, the software returns only an estimation of one coefficient for each region type. This is, it return one for rural and for urban. In other words, the wage rates for each region are normalized to a common base (the constant).

I am trying to understand why switchers make thegenerate a difference result. I have been through formulas and matrix algebra, textbooks and google, and so far I cannot resolve this. Now I want your help!

Further information:

  • This behaviour does not follow through in random-effects. Regardless of whether switching exists or not, RE can identify all coefficients. Thus, the result is necessarily due to a combination of switching and the intrinsic demeaning nature of FE.
  • I've tried in different software and commands, and the result holds.
  • Identification of all coefficients (but one) requires full rank of matrix $\sum_{i=1}^{N}(\ddot{X_{i}}'\ddot{X_{i}})$, where $\ddot{X_{i}}$ is the demeaned data matrix for individual $i$ (Wooldridge (2010), p.304). According to my calculations, if there are no switchers, that matrix is a diagonal, with element $(1,1)=NT$, and all rest diagonal elements equal to $\frac{N_{u/r}}{N}\frac{T-1}{T}$$N_{u/r}\frac{T-1}{T}$, where $N_{u/r}$ is the number of individuals on each region. I cannot see how that matrix has no full rank, and so cannot see why all coefficients are not calculated. For example, in the case of individual 1 above, $\ddot{X_{i}}$ is:

$$ \begin{array}{ccccc} 1 & 0.5 & -0.5 & 0 & 0 \\ 1 & -0.5 & 0.5 & 0 & 0 \end{array} $$

and $\ddot{X_{i}}'\ddot{X_{i}}$ is:

$$ \begin{array}{ccccc} 2 & 0 & 0 & 0 & 0 \\ 0 & 0.5 & 0 & 0 & 0 \\ 0 & 0 & 0.5 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \end{array} $$

Combined with another non-switcher who lives in a rural area, the sum is:

$$ \begin{array}{ccccc} 4 & 0 & 0 & 0 & 0 \\ 0 & 0.5 & 0 & 0 & 0 \\ 0 & 0 & 0.5 & 0 & 0 \\ 0 & 0 & 0 & 0.5 & 0 \\ 0 & 0 & 0 & 0 & 0.5 \end{array} $$

Which clearly has full rank. And so on. So why are not all coefficients estimated?

Consider a simple panel data model of wage determination, with two periods, and only one regressor: a dummy of whether individual lives in urban or rural area. Importantly, individuals can change location between periods. $u$ is urban, $r$ is rural. $1$ is year 1, $2$ is year 2, and $i$ is individual. The model is:

$$ w_{it} = \alpha + \beta_{u,1} D_{i,u,1} + \beta_{u,2} D_{i,u,2} + \beta_{r,1} D_{i,r,1} + \beta_{r,2} D_{i,r,2} + \epsilon_{it} $$

where $D_{i,u/r,t}$ is the dummy stating whether individual $i$ is in rural/urban in period $t$. (Note: I add all categories just for clarification. Naturally, they are fully collinear).

For example, the data matrix might look like this:

$$ \begin{array}{c|ccccc} i & t & \text{constant} & D_{i,u,1} & D_{i,u,2} & D_{i,r,1} & D_{i,r,2} \\ \hline 1 & 1 & 1 & 1 & 0 & 0 & 0 \\ 1 & 2 & 1 & 0 & 1 & 0 & 0 \\ 2 & 1 & 1 & 1 & 0 & 0 & 0 \\ 2 & 2 & 1 & 0 & 0 & 0 & 1 \end{array} $$

Individual 1 remains in urban in both periods, whether individual 2 switches from urban to rural.

I am estimating a model like this using fixed-effects. The fact is the following:

  • If the dataset has switchers, the software returns an estimation for each of $\beta_{u/r,t}$ (except one of course, if the constant is included; if not included, it return a coefficient for all of them).
  • If the dataset has no switchers, the software returns only an estimation of one coefficient for each region type. This is, it return one for rural and for urban. In other words, the wage rates for each region are normalized to a common base (the constant).

I am trying to understand why switchers make the difference result. I have been through formulas and matrix algebra, textbooks and google, and so far I cannot resolve this. Now I want your help!

Further information:

  • This behaviour does not follow through in random-effects. Regardless of whether switching exists or not, RE can identify all coefficients. Thus, the result is necessarily due to a combination of switching and the intrinsic demeaning nature of FE.
  • I've tried in different software and commands, and the result holds.
  • Identification of all coefficients (but one) requires full rank of matrix $\sum_{i=1}^{N}(\ddot{X_{i}}'\ddot{X_{i}})$, where $\ddot{X_{i}}$ is the demeaned data matrix for individual $i$ (Wooldridge (2010), p.304). According to my calculations, if there are no switchers, that matrix is a diagonal, with element $(1,1)=NT$, and all rest diagonal elements equal to $\frac{N_{u/r}}{N}\frac{T-1}{T}$, where $N_{u/r}$ is the number of individuals on each region. I cannot see how that matrix has no full rank, and so cannot see why all coefficients are not calculated. For example, in the case of individual 1 above, $\ddot{X_{i}}$ is:

$$ \begin{array}{ccccc} 1 & 0.5 & -0.5 & 0 & 0 \\ 1 & -0.5 & 0.5 & 0 & 0 \end{array} $$

and $\ddot{X_{i}}'\ddot{X_{i}}$ is:

$$ \begin{array}{ccccc} 2 & 0 & 0 & 0 & 0 \\ 0 & 0.5 & 0 & 0 & 0 \\ 0 & 0 & 0.5 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \end{array} $$

Combined with another non-switcher who lives in a rural area, the sum is:

$$ \begin{array}{ccccc} 4 & 0 & 0 & 0 & 0 \\ 0 & 0.5 & 0 & 0 & 0 \\ 0 & 0 & 0.5 & 0 & 0 \\ 0 & 0 & 0 & 0.5 & 0 \\ 0 & 0 & 0 & 0 & 0.5 \end{array} $$

Which clearly has full rank. And so on. So why are not all coefficients estimated?

Consider a simple panel data model of wage determination, with two periods, and only one regressor: a dummy of whether individual lives in urban or rural area. Importantly, individuals can change location between periods. $u$ is urban, $r$ is rural. $1$ is year 1, $2$ is year 2, and $i$ is individual. The model is:

$$ w_{it} = \alpha + \beta_{u,1} D_{i,u,1} + \beta_{u,2} D_{i,u,2} + \beta_{r,1} D_{i,r,1} + \beta_{r,2} D_{i,r,2} + \epsilon_{it} $$

where $D_{i,u/r,t}$ is the dummy stating whether individual $i$ is in rural/urban in period $t$. (Note: I add all categories just for clarification. Naturally, they are fully collinear).

For example, the data matrix might look like this:

$$ \begin{array}{c|ccccc} i & t & \text{constant} & D_{i,u,1} & D_{i,u,2} & D_{i,r,1} & D_{i,r,2} \\ \hline 1 & 1 & 1 & 1 & 0 & 0 & 0 \\ 1 & 2 & 1 & 0 & 1 & 0 & 0 \\ 2 & 1 & 1 & 1 & 0 & 0 & 0 \\ 2 & 2 & 1 & 0 & 0 & 0 & 1 \end{array} $$

Individual 1 remains in urban in both periods, whether individual 2 switches from urban to rural.

I am estimating a model like this using fixed-effects. The fact is the following:

  • If the dataset has switchers, the software returns an estimation for each of $\beta_{u/r,t}$ (except one of course, if the constant is included; if not included, it return a coefficient for all of them).
  • If the dataset has no switchers, the software returns only an estimation of one coefficient for each region type. This is, it return one for rural and for urban. In other words, the wage rates for each region are normalized to a common base (the constant).

I am trying to understand why switchers generate a difference result. I have been through formulas and matrix algebra, textbooks and google, and so far I cannot resolve this. Now I want your help!

Further information:

  • This behaviour does not follow through in random-effects. Regardless of whether switching exists or not, RE can identify all coefficients. Thus, the result is necessarily due to a combination of switching and the intrinsic demeaning nature of FE.
  • I've tried in different software and commands, and the result holds.
  • Identification of all coefficients (but one) requires full rank of matrix $\sum_{i=1}^{N}(\ddot{X_{i}}'\ddot{X_{i}})$, where $\ddot{X_{i}}$ is the demeaned data matrix for individual $i$ (Wooldridge (2010), p.304). According to my calculations, if there are no switchers, that matrix is a diagonal, with element $(1,1)=NT$, and all rest diagonal elements equal to $N_{u/r}\frac{T-1}{T}$, where $N_{u/r}$ is the number of individuals on each region. I cannot see how that matrix has no full rank, and so cannot see why all coefficients are not calculated. For example, in the case of individual 1 above, $\ddot{X_{i}}$ is:

$$ \begin{array}{ccccc} 1 & 0.5 & -0.5 & 0 & 0 \\ 1 & -0.5 & 0.5 & 0 & 0 \end{array} $$

and $\ddot{X_{i}}'\ddot{X_{i}}$ is:

$$ \begin{array}{ccccc} 2 & 0 & 0 & 0 & 0 \\ 0 & 0.5 & 0 & 0 & 0 \\ 0 & 0 & 0.5 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 \end{array} $$

Combined with another non-switcher who lives in a rural area, the sum is:

$$ \begin{array}{ccccc} 4 & 0 & 0 & 0 & 0 \\ 0 & 0.5 & 0 & 0 & 0 \\ 0 & 0 & 0.5 & 0 & 0 \\ 0 & 0 & 0 & 0.5 & 0 \\ 0 & 0 & 0 & 0 & 0.5 \end{array} $$

Which clearly has full rank. And so on. So why are not all coefficients estimated?

Source Link
luchonacho
  • 2.7k
  • 5
  • 26
  • 47
Loading