Research Notebook

Random Effects Decomposition

June 27, 2011 by Alex

Motivation

I work through the error components econometric model outlined in Amemiya (1985). I use Hayashi (2000) as a reference text. I work through this example because I use this model in my working paper with Chris Mayer on bubble identification and I would like to  work out the details as I didn’t spend much time on these sorts of  models in my core econometrics courses.

In my paper with Chris, I develop a method of identifying relative  mispricings between city specific markets in the US residential  housing market using flows of speculative buyers between cities and  assuming that city sizes are exogenous. Previously, analysts  suspected that the housing bubble was due to credit supply  factors. I use a random effects model to gauge the relative  importance of 1) aggregate credit supply factors and 2)  cross-city speculator flows in explaining mis-pricing in the housing  market in our sample.

 

Econometric Framework

I characterize the random effects error components  estimator outlined in Amemiya (1985, Ch. 6). Consider a balanced panel with N panels and T observations per  panel. I study a regression specification of the following type:

(1)   \begin{align*} y_{n,t} \ &= \ \langle X_{n,t} \mid \beta \rangle \ + \ \mu_n \ + \ \lambda_t \ + \ \varepsilon_{n,t} \end{align*}

 

I can vectorize this specification by stacking each of these N  \times T equations:

(2)   \begin{align*} \begin{split} \mathcal{U} \ &= \ \langle I_N \otimes 1_T \mid \mu \rangle \ + \ \langle 1_N \otimes I_T \mid \lambda \rangle \ + \ \mathcal{E} \\ Y \ &= \ \langle X \mid \beta \rangle \ + \ \mathcal{U} \end{split} \end{align*}

 

Assumptions

I make the following assumptions about the shape of the errors:

Assumption: (Error Structure) I assume that:

1) Unbiased-ness: \langle \mu_n \rangle = 0, \langle \lambda_t \rangle = 0 and \langle \varepsilon_{n,t} \rangle = 0

2) White-Noise: \langle \mu_n \mid \lambda_t \rangle = 0,  \langle \lambda_t \mid \varepsilon_{n,t} \rangle = 0 and \langle \varepsilon_{n,t} \mid \mu_n \rangle = 0

3) Homoskedasticity: \vert \mu \rangle \langle \mu \vert = I_N \cdot \sigma^2_\mu, \vert \lambda \rangle \langle \lambda \vert = I_T \cdot \sigma^2_\lambda and \vert \varepsilon \rangle \langle \varepsilon \vert = I_{N \times T} \cdot \sigma^2_{\varepsilon}

 

What are the key take-aways from these assumptions? First,  assumption 1) means that there is a constant term in the  explanatory X variables. Assumption 2) is just the standard  white noise assumption. Assumption 3) is the key restriction. This  assumption says that the within and between effects are independent  across time and panels respectively. The estimator I define below  allows me to learn the values of \sigma_\mu^2, \sigma_\lambda^2  and \sigma_\varepsilon^2.

 

Estimation

How do I go about estimating these 3 objects? First, I define some notation to make my life a bit easier and stave  of carpel tunnel for a few more semesters:

(3)   \begin{align*} \begin{split} F \ &= \ \vert I_N \otimes 1_T \rangle \langle I_N \otimes 1_T \vert \\ G \ &= \ \vert 1_N \otimes I_T \rangle \langle 1_N \otimes I_T \vert \end{split} \end{align*}

 

Also, let H be an (N \cdot T) \cdot (N \cdot T - N - T + 1) unit  matrix. I name the error covariance matrix \Omega, and then characterize  it as a linear function of the 3 variance terms of interest:

(4)   \begin{align*} \begin{split} \Omega \ &= \ \vert \mathcal{U} \rangle \langle \mathcal{U} \vert \\ &= \ \sigma_\mu^2 \cdot F \ + \ \sigma^2_\lambda \cdot G \ + \ \sigma_\varepsilon^2 \cdot I_{N \times T} \end{split} \end{align*}

 

I can write out the inverse of the error covariance matix \Omega  as follows:

(5)   \begin{align*} \begin{split} \Omega^{-1} \ &= \ \frac{1}{\sigma_\varepsilon^2} \cdot \left( I_{N \times T} - \gamma_1 \cdot F + \gamma_2 \cdot G + \gamma_3 \cdot H \right) \\ \gamma_1 \ &= \ \frac{\sigma_\mu^2}{\sigma_\varepsilon^2 + T \cdot \sigma_\mu^2} \\ \gamma_2 \ &= \ \frac{\sigma_\lambda^2}{\sigma_\varepsilon^2 + N \cdot \sigma_\lambda^2} \\ \gamma_3 \ &= \ \gamma_1 \cdot \gamma_2 \cdot \left( \ \frac{2 \cdot \sigma_\varepsilon^2 + T \cdot \sigma_\mu^2 + N \cdot \sigma_\lambda^2}{\sigma_\varepsilon^2 + T \cdot \sigma_\mu^2 + N \cdot \sigma_\lambda^2} \ \right) \end{split} \end{align*}

 

This formulation shows that the sample error covariance matrix will  provide unbiased and consistent estimates if both N \to \infty and  T \to \infty. In this not, I am not going to worry about what is  the most consistent estimator for the parameters. Next, I want to decompose the error covariance matrix into within,  between and indiosyncratic components. To do this I need 1 last  piece of notation:

(6)   \begin{align*} Q \ &= \ I \ - \ \frac{F}{T} \ - \ \frac{G}{N} \ + \ \frac{H}{N \cdot T} \end{align*}

 

Think about this as an orthogonal decomposition of a unitary error  covariance matrix into each of the 3 components: within, between  and idiosyncratic. Then, using this term, Amemiya (1971) shows that the following  estimators for the parameter vector \begin{bmatrix} \sigma_\mu^2 &  \sigma_\lambda^2 & \sigma_\varepsilon^2 \end{bmatrix}:

(7)   \begin{align*} \begin{split} \hat{\mathcal{U}} \ &= \ Y \ - \ \langle X \mid \hat{\beta} \rangle \\ \hat{\sigma}_{\varepsilon}^2 \ &= \ \frac{\langle \hat{\mathcal{U}} \mid \langle Q \mid \hat{\mathcal{U}} \rangle \rangle}{(N-1) \cdot (T-1)} \\ \hat{\sigma}_{\mu}^2 \ &= \ \frac{\langle \hat{\mathcal{U}} \mid \langle \frac{T-1}{T} \cdot F - \frac{T-1}{N \cdot T} \cdot H - Q \mid \hat{\mathcal{U}} \rangle \rangle}{T \cdot (N-1) \cdot (T-1)} \\ \hat{\sigma}_{\lambda}^2 \ &= \ \frac{\langle \hat{\mathcal{U}} \mid \langle \frac{N-1}{N} \cdot G - \frac{N-1}{N \cdot T} \cdot H - Q \mid \hat{\mathcal{U}} \rangle \rangle}{T \cdot (N-1) \cdot (T-1)} \end{split} \end{align*}

Filed Under: Uncategorized

Pages

  • Publications
  • Working Papers
  • Curriculum Vitae
  • Notebook
  • Courses

Copyright © 2026 · eleven40 Pro Theme on Genesis Framework · WordPress · Log in