Skip to content

Twfe

The model

We are interested in a model of wages, where we want to be able to talk about the potential wage that each individual might be getting at each employer.

In every approach at the moment we want to keep the orginial allocation of workers to firms fixed, let's call this J.

So we are thinking of a model as the implied density of wages for any potential allocation including the one we observe.

What we are given is a panel with (y_{it},j_{it}) that we assume is balanced for simplificty.

We then assume a latent heterogeneity model where each worker has a type \alpha_i and each firm has a type \psi_j and such that the potential wage of worker i at firm j is determined by

y_i = \alpha_i + \psi_j +\epsilon_{ijt}

and where we further assume that \epsilon_{ijt} are conditinal mean independent of the assignment. In its

We then define two objects of interest in this model:

\begin{aligned} \sigma_\psi &= \frac{1}{NT} \sum_{i,t} (\psi_{j(i,t)} - \bar{\psi})^2 \\ c_{\alpha \psi} &= \frac{1}{NT} \sum_{i,t} (\alpha_i - \bar{\alpha}) (\psi_{j(i,t)} - \bar{\psi}) \end{aligned}

At this point we actually haven't said anything on how we want to model \alpha_i,\psi_j. The fixed effect approach proposes to simply treat each of them as parameters. In this linear settings the linear regression provides an unbiased estimator.

Random effect estimator

We can choose to impose additional restrictions on the model of \alpha_i,\psi_j. In order to continue keeping the mobility matrix as flexible as possible, we the choose to model f(\gamma | J) where we can compute it for any J, including the one in the data.

We can think of the FE as a degenerated distribution with parameters \alpha_i,\psi_j.

We start with Woodcock, who says simply that the variance conditional on J is diagonal with \psi and \alpha specific variance. This has implications for many \alpha_i and \psi_j, the same implication regardless of where the worker works and where is has moved.

This gives us powerful resitrictions that can be used:

\begin{aligned} Cov(y_{it},y_{i't'}|j(i,t) = j(i',t')) & = Cov(\alpha_i + \psi_j,\alpha_i + \psi_j|j(i,t) = j(i',t')) \\ &= \sigma_\psi^2 \\ \end{aligned}

We note that this is also the between firm variance. Hence we would attribute all between firm variance to firm premiums.

Similarly, if you were willing to assume that the error terms are uncorrolated over time, one could look at the the covariance between the wage in 2 different firms for each individual:

\begin{aligned} Cov(y_{it},y_{it'}|j(i,t) \neq j(i',t')) & = Cov(\alpha_i + \psi_j,\alpha_i + \psi_j|j(i,t) = j(i',t')) \\ &= \sigma_\alpha^2 \\ \end{aligned}

Random effect estimator 2

One can of course weaken the assumptions of complete independence in the way the \alpha_i and \psi_j relate to each other. We then proposed to allow for covariances between the \alpha of co-workers and co-variances between the \alpha and the \psi if i works in j.

We assumed however that Cov(\psi_{j(i,t)},\psi_{i,t'} |\psi_{i,t} \neq \psi_{i,t'} ) = 0.

Using short end notation for covariance:

\begin{aligned} \langle Y^s , Y^s \rangle & = \langle \psi +\alpha^s, \psi + \alpha^{s} \rangle \\ & = \sigma_\psi^2 + \langle \alpha^s ,\alpha^{s} \rangle + 2 \langle \alpha^s , \psi \rangle \\ \langle Y^s , Y_2^{m_2} \rangle & = \langle \psi +\alpha^s, \psi + \alpha^{m_2} \rangle \\ & = \sigma_\psi^2 + \langle \alpha^s ,\alpha^{m_2} \rangle + \langle \alpha^s , \psi \rangle + \langle \alpha^{m_2} , \psi_2 \rangle \\ \langle Y^s , Y_1^{m_1} \rangle & = \langle \psi +\alpha^s, \psi + \alpha^{m_1} \rangle \\ & = \sigma_\psi^2 + \langle \alpha^s ,\alpha^{m_1} \rangle + \langle \alpha^s , \psi \rangle + \langle \alpha^{m_1} , \psi_1 \rangle \\ \langle Y^s , Y_2^{m_1} \rangle & = \langle \psi +\alpha^s, \psi' + \alpha^{m_1} \rangle \\ & = \langle \alpha^s ,\alpha^{m_1} \rangle + \langle \alpha^{m_1} , \psi_1 \rangle \\ \langle Y^s , Y_1^{m_2} \rangle & = \langle \psi +\alpha^s, \psi' + \alpha^{m_2} \rangle \\ & = \langle \alpha^s ,\alpha^{m_2} \rangle + \langle \alpha^{m_2} , \psi_2 \rangle \\ \end{aligned}

and

\begin{aligned} \langle Y_1^{m_1} , Y_1^{m_1} \rangle & = \langle \psi +\alpha^{m_1}, \psi + \alpha^{m_1} \rangle \\ & = \sigma_\psi^2 + \langle \alpha^{m_1} , \alpha^{m_1} \rangle + 2 \langle \alpha^{m_1} , \psi_1 \rangle \\ \langle Y_1^{m_1} , Y_2^{m_1} \rangle & = \langle \psi +\alpha^{m_1}, \psi' + \alpha^{m_1} \rangle \\ & = \langle \alpha^{m_1} , \alpha^{m_1} \rangle + \langle \alpha^{m_1} , \psi_1 \rangle \\ \langle Y_2^{m_1} , Y_2^{m_1} \rangle & = \langle \psi'' +\alpha^{m_1}, \psi' + \alpha^{m_1} \rangle \\ & = \langle \alpha^{m_1} , \alpha^{m_1} \rangle \\ \end{aligned}

and

\begin{aligned} \langle Y_1^{m_2} , Y_1^{m_2} \rangle & = \langle \psi +\alpha^{m_2}, \psi + \alpha^{m_2} \rangle \\ & = \sigma_\psi^2 + \langle \alpha^{m_2} , \alpha^{m_2} \rangle + 2 \langle \alpha^{m_2} , \psi_2 \rangle \\ \langle Y_1^{m_2} , Y_2^{m_2} \rangle & = \langle \psi' +\alpha^{m_2}, \psi + \alpha^{m_2} \rangle \\ & = \langle \alpha^{m_2} , \alpha^{m_2} \rangle + \langle \alpha^{m_2} , \psi_2 \rangle \\ \langle Y_2^{m_2} , Y_2^{m_2} \rangle & = \langle \psi'' +\alpha^{m_2}, \psi' + \alpha^{m_2} \rangle \\ & = \langle \alpha^{m_2} , \alpha^{m_2} \rangle \\ \end{aligned}

and

\begin{aligned} \langle Y_2^{m_1} , Y_1^{m_2} \rangle & = \langle \psi' +\alpha^{m_1}, \psi'' + \alpha^{m_2} \rangle \\ & = \langle \alpha^{m_1} , \alpha^{m_2} \rangle \\ \langle Y_1^{m_1} , Y_1^{m_2} \rangle & = \langle \psi +\alpha^{m_1}, \psi' + \alpha^{m_2} \rangle \\ & = \langle \alpha^{m_1} , \alpha^{m_2} \rangle + \langle \alpha^{m_2} , \psi_1 \rangle \\ \langle Y_2^{m_1} , Y_2^{m_2} \rangle & = \langle \psi' +\alpha^{m_1}, \psi + \alpha^{m_2} \rangle \\ & = \langle \alpha^{m_1} , \alpha^{m_2} \rangle + \langle \alpha^{m_1} , \psi_2 \rangle \\ \langle Y_1^{m_1} , Y_2^{m_2} \rangle & = \langle \psi +\alpha^{m_1}, \psi + \alpha^{m_2} \rangle \\ & = \sigma_\psi^2 + \langle \alpha^{m_1} , \alpha^{m_2} \rangle + \langle \alpha^{m_1} , \psi_2 \rangle + \langle \alpha^{m_2} , \psi_1 \rangle\\ \end{aligned}

Random effect estimator 3

We leave fully flexible the mean \psi and \alpha at the cluster levels.