## Sunday, January 16, 2011

### Mixed, Fixed, and Random Effects Models

The General Mixed Model:

Y  = Xβ + Z α+ e            (1)

β =  fixed effects co-efficient vector

X = fixed effects model matrix

α = random effects co-efficient matrix

Z =  random effects model matrix

The fixed part of the model is specified by and the random part by Zα+ e.

The ‘random effects’ matrix (α) represents random effects that vary across individuals vs. the ‘fixed effects’ matrix (β) that represents effects that are the same across all individuals.

Panel Data: Cross sectional time series data, in most cases looking at hundreds or thousands of individuals (units) observed at several points across time, i.e. multiple observations per unit across time.

Heterogeneity Effect: Whether or not effects, or responses of individuals are the same across time, or if there are group differences.  If effects are not the same, and they are not accounted for, estimation errors result. Fixed and random effects models attempt to capture the heterogeneity effect.

Given

yit =b xit + αi + uit                  (4)

αi is an unobserved individual effect

Fixed Effects Model (FE): αi is correlated with x. In this model individual effects, or differences across individuals can be captured by shifts in the regression equation, or dummy variables.
As such we can estimate the fixed effects model as a Least Squares Dummy Variable model (LSDV):

y= Xb + dα + e            (5)

where d is a vector of dummy variables for each individual or unit effect.

Random Effects Model (RE): αi is uncorrelated with x. Individual effects are randomly distributed across units.

yit =b xit + αi+ uit            (6)

Note that (4) and (6) are identical, the only difference is the assumptions about the individual effect αi and how the models are estimated.

Note also that (6) differs from (1) in that we don’t have the matrix Z. The Random Effects model is in fact a special case of the general mixed model with a random intercept (αi).

The random effects model is estimated using Generalized Least Squares (GLS) :

βGLS = (X’Ω-1X)-1(X’Ω-1Y) where Ω = I Σ    (7)

Where Σ is the variance αi+ uit . If  Σ is unknown, it is estimated, producing a feasible generalized least squares estimate βFGLS

Whether a FE or RE model should be used can be determined based on the Housman test (see Greene, for more details)

References:

Greene, Econometric Analysis, 5th Edition

1. 2. 