1/68: topic 1.3 – linear panel data regression microeconometric modeling william greene stern...

68
1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA 1.3 Linear Panel Data Regression Models

Upload: samantha-stone

Post on 04-Jan-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

1/68: Topic 1.3 – Linear Panel Data Regression

Microeconometric Modeling

William GreeneStern School of BusinessNew York UniversityNew York NY USA

1.3 Linear Panel Data Regression Models

Page 2: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

2/68: Topic 1.3 – Linear Panel Data Regression

Concepts

• Unbalanced Panel• Cluster Estimator• Block Bootstrap• Difference in Differences• Incidental Parameters

Problem• Endogeneity• Instrumental Variable• Control Function Estimator• Mundlak Form• Correlated Random Effects• Hausman Test• Lagrange Multiplier (LM) Test• Variable Addition (Wu) Test

Models

• Linear Regression• Fixed Effects LR Model• Random Effects LR Model

Page 3: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

3/68: Topic 1.3 – Linear Panel Data Regression

Page 4: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

4/68: Topic 1.3 – Linear Panel Data Regression

Page 5: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

5/68: Topic 1.3 – Linear Panel Data Regression

Page 6: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

6/68: Topic 1.3 – Linear Panel Data Regression

BHPS Has Evolved

Page 7: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

7/68: Topic 1.3 – Linear Panel Data Regression

German Socioeconomic Panel

Page 8: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

8/68: Topic 1.3 – Linear Panel Data Regression

Balanced and Unbalanced Panels

Distinction: Balanced vs. Unbalanced Panels

A notation to help with mechanics zi,t, i = 1,…,N; t = 1,…,Ti

The role of the assumption Mathematical and notational convenience:

Balanced, n=NT Unbalanced:

The fixed Ti assumption almost never necessary.

If unbalancedness is due to nonrandom attrition from an otherwise balanced panel, then this will require special considerations.

N

ii=1n T

Page 9: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

9/68: Topic 1.3 – Linear Panel Data Regression

An Unbalanced Panel: RWM’s GSOEP Data on Health Care

N = 7,293 Households

Some households exited then returned

Page 10: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

10/68: Topic 1.3 – Linear Panel Data Regression

Cornwell and Rupert DataCornwell and Rupert Returns to Schooling Data, 595 Individuals, 7 Years(Extracted from NLSY.) Variables in the file are

EXP = work experienceWKS = weeks workedOCC = occupation, 1 if blue collar, IND = 1 if manufacturing industrySOUTH = 1 if resides in southSMSA = 1 if resides in a city (SMSA)MS = 1 if marriedFEM = 1 if femaleUNION = 1 if wage set by union contractED = years of educationLWAGE = log of wage = dependent variable in regressions

These data were analyzed in Cornwell, C. and Rupert, P., "Efficient Estimation with Panel Data: An Empirical Comparison of Instrumental Variable Estimators," Journal of Applied Econometrics, 3, 1988, pp. 149-155.  See Baltagi, page 122 for further analysis.  The data were downloaded from the website for Baltagi's text.

Page 11: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

11/68: Topic 1.3 – Linear Panel Data Regression

Page 12: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

12/68: Topic 1.3 – Linear Panel Data Regression

Common Effects Models Unobserved individual effects in regression: E[yit | xit, ci]

Notation:

Linear specification: Fixed Effects: E[ci | Xi ] = g(Xi). Cov[xit,ci] ≠0 effects are correlated with included variables.

Random Effects: E[ci | Xi ] = μ; effects are uncorrelated with included variables. If Xi contains a constant term, μ=0 WLOG. Common: Cov[xit,ci] =0, but E[ci | Xi ] = μ is needed for the full model

it it i ity = + c + x

i

i1

i2i i

iT

T rows, K columns

x

xX

x

Page 13: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

13/68: Topic 1.3 – Linear Panel Data Regression

Convenient Notation

Fixed Effects – the ‘dummy variable model’

Random Effects – the ‘error components model’

it i it ity = + + x

it it it iy = + + u x

Individual specific constant terms.

Compound (“composed”) disturbance

Page 14: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

14/68: Topic 1.3 – Linear Panel Data Regression

Estimating β

β is the partial effect of interest Can it be estimated (consistently) in

the presence of (unmeasured) ci? Does pooled least squares “work?” Strategies for “controlling for ci” using

the sample data.

Page 15: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

15/68: Topic 1.3 – Linear Panel Data Regression

1. The Pooled Regression

Presence of omitted effects

Potential bias/inconsistency of OLS – Depends on ‘fixed’ or ‘random’ If FE, X is endogenous: Omitted Variables Bias If RE, OLS is OK but standard errors are

incorrect.

it it i it

i i i i i

i i i i i i i

Ni=1 i

y = +c+ε , observation for person i at time t

= +c + , T observations in group i

= + + , note (c ,c ,...,c )

= + + , T observations in the sample

x β

y Xβ i ε

Xβ c ε c

y Xβ c ε

Page 16: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

16/68: Topic 1.3 – Linear Panel Data Regression

OLS with Individual EffectsThe omitted variable(s) are the group means

-1 -1

-1N Ni=1 i i i=1 i i

-1N Ni=1 i i i=1 i i

=( ) ( ) ( + + )

= + (1/N)Σ (1/N)Σ (part due to the omitted c )

+ (1/N)Σ (1/N)Σ (covariance of and will = 0)

The third term

b XX X'y= XX X' Xβ c ε

β XX Xc

XX Xε X ε

i

-1N N ii=1 i i i=1 i i

Ni=1 i i i

i i

vanishes asymptotically by assumption

T1plim = + plim Σ Σ c (left out variable formula)

N N

So, what becomes of Σ w c ?

plim = if the covariance of and c

b β XX x

x

b β x converges to zero.

Page 17: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

17/68: Topic 1.3 – Linear Panel Data Regression

Ordinary Least Squares

Standard results for OLS in a generalized regression model Consistent if RE, inconsistent if FE. Unbiased for something in either case. Inefficient in all cases.

True Variance

1 12

N N N Ni 1 i i 1 i i 1 i i 1 i

Var[ | ]T T T T

XX XΩX XXb X

Page 18: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

18/68: Topic 1.3 – Linear Panel Data Regression

Estimating the Sampling Variance of b

b may or may not be consistent for . We estimate its variance regardless

s2(X ́X)-1 is not the correct matrix Correlation across observations: Yes Heteroscedasticity: Maybe

Is there a “robust” covariance matrix? Robust estimation (in general) The White estimator for

heteroscedasticity A Robust estimator for OLS.

Page 19: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

19/68: Topic 1.3 – Linear Panel Data Regression

A Cluster Estimator

i i

i

ˆ ˆ

ˆ ˆ

ˆ

i

T TNi=1 t=1 it it t=1 it it

T TNi=1 t=1 s=1 it is it is

it

Robust variance estimator for Var[ | ]

Est.Var[ | ]

N = Σ Σ w Σ w

N-1

N = Σ Σ Σ w w

N-1

w = a least square

-1 -1

-1 -1

b X

b X

XX x x XX

XX x x XX

i

Ni=1 i

Ni=1 i

s residual.

(If T = 1, this is the White estimator.)

(The finite population correction [N/ (N-1)] is ad hoc.)

Σ T(The further finite population correction, is also ad hoc.)

Σ T N

Page 20: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

20/68: Topic 1.3 – Linear Panel Data Regression

Alternative OLS Variance EstimatorsCluster correction increases SEs

+---------+--------------+----------------+--------+---------+|Variable | Coefficient | Standard Error |b/St.Er.|P[|Z|>z] |+---------+--------------+----------------+--------+---------+ Constant 5.40159723 .04838934 111.628 .0000 EXP .04084968 .00218534 18.693 .0000 EXPSQ -.00068788 .480428D-04 -14.318 .0000 OCC -.13830480 .01480107 -9.344 .0000 SMSA .14856267 .01206772 12.311 .0000 MS .06798358 .02074599 3.277 .0010 FEM -.40020215 .02526118 -15.843 .0000 UNION .09409925 .01253203 7.509 .0000 ED .05812166 .00260039 22.351 .0000Robust Constant 5.40159723 .10156038 53.186 .0000 EXP .04084968 .00432272 9.450 .0000 EXPSQ -.00068788 .983981D-04 -6.991 .0000 OCC -.13830480 .02772631 -4.988 .0000 SMSA .14856267 .02423668 6.130 .0000 MS .06798358 .04382220 1.551 .1208 FEM -.40020215 .04961926 -8.065 .0000 UNION .09409925 .02422669 3.884 .0001 ED .05812166 .00555697 10.459 .0000

Page 21: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

21/68: Topic 1.3 – Linear Panel Data Regression

Results of Bootstrap Estimation

Page 22: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

22/68: Topic 1.3 – Linear Panel Data Regression

Bootstrap variance for a panel data estimator Panel Bootstrap =

Block Bootstrap Data set is N groups of

size Ti

Bootstrap sample is N groups of size Ti drawn with replacement.

The bootstrap replication must account for panel data nature of the data set.

Page 23: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

23/68: Topic 1.3 – Linear Panel Data Regression

Page 24: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

24/68: Topic 1.3 – Linear Panel Data Regression

Difference-in-Differences ModelWith two periods and strict exogeneity of D and T,

This is a linear regression model. If there are no regressors,

it 0 1 it 2 t 3 t it it

it

t

y = D T TD

D = dummy variable for a treatment that takes place

between time 1 and time 2 for some of the individuals,

T = a time period dummy variable, 0 in period 1,

1 in period 2.

3 t 2 t 1 D 1 t 2 t 1 D 0

Using least squares,

b (y y ) (y y )

Page 25: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

25/68: Topic 1.3 – Linear Panel Data Regression

Difference in Differences

it 0 1 it 2 t 3 it t it it

it 2 3 i2 it it

2 3 i2 it i

it it

3 it it

y = D T D T ,t 1,2

y = D ( )

= D ( ) w

y | D 1 y | D 0

( | D 1) ( | D 0)

If the effect is estimated by averaging individua

βx

βx

β x

β x x

ls with D = 1

and different individuals with D=0, then part of the 'effect'

is explained by change in the covariates, not the treatment.

Page 26: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

26/68: Topic 1.3 – Linear Panel Data Regression

UK Office of Fair Trading, May 2012; Stephen Davies

http://dera.ioe.ac.uk/14610/1/oft1416.pdf

Page 27: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

27/68: Topic 1.3 – Linear Panel Data Regression

Outcome is the fees charged.

Activity is collusion on fees.

Page 28: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

28/68: Topic 1.3 – Linear Panel Data Regression

Treatment Schools: Treatment is an intervention by the Office of Fair Trading

Control Schools were not involved in the conspiracy

Treatment is not voluntary

Page 29: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

29/68: Topic 1.3 – Linear Panel Data Regression

Apparent Impact of the Intervention

Page 30: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

30/68: Topic 1.3 – Linear Panel Data Regression

Page 31: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

31/68: Topic 1.3 – Linear Panel Data Regression

Treatment (Intervention) Effect = 1 + 2 if SS school

Page 32: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

32/68: Topic 1.3 – Linear Panel Data Regression

In order to test robustness two versions of the fixed effects model were run. The first is Ordinary Least Squares, and the second is heteroscedasticity and auto-correlation robust (HAC) standard errors in order to check for heteroscedasticity and autocorrelation.

Page 33: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

33/68: Topic 1.3 – Linear Panel Data Regression

Page 34: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

34/68: Topic 1.3 – Linear Panel Data Regression

The cumulative impact of the intervention is the area between the two paths from intervention to time T.

Page 35: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

35/68: Topic 1.3 – Linear Panel Data Regression

Page 36: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

36/68: Topic 1.3 – Linear Panel Data Regression

2. Estimation with Fixed Effects

The fixed effects model

ci is arbitrarily correlated with xit but E[εit|Xi,ci]=0

Dummy variable representation

it it i it

i i i i i

i i i i i i i

Ni=1 i

1 2 N

y = +c+ε , observation for person i at time t

= +c + , T observations in group i

= + + , note (c ,c ,...,c )

= + + , T observations in the sample

c=( , ,... ) ,

x β

y Xβ i ε

Xβ c ε c

y Xβ c ε

c c c Ni=1 iT by 1 vector

Nit it j=1 j ijt it ijty = + d +ε , d = (i=j) x β 1

Page 37: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

37/68: Topic 1.3 – Linear Panel Data Regression

The Fixed Effects Model

yi = Xi + dii + εi, for each individual

1 1

2 2

N

=

=

N

1

2

N

y X d 0 0 0

y X 0 d 0 0 βε

α

y X 0 0 0 d

β [X,D] ε

α

Zδ ε

E[ci | Xi ] = g(Xi); Effects are correlated with included variables. Cov[xit,ci] ≠0

Page 38: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

38/68: Topic 1.3 – Linear Panel Data Regression

Estimating the Fixed Effects Model

The FEM is a plain vanilla regression model but with many independent variables

Least squares is unbiased, consistent, efficient, but inconvenient if N is large.

1

1

Using the Frisch-Waugh theorem

=[ ]

D D

b XX XD Xy

a DX DD Dy

b XM X XM y

Page 39: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

39/68: Topic 1.3 – Linear Panel Data Regression

The Within Transformation Removes the Effects

it it i it

i i i i

it i it i it i

it it it

y c+ε

y c+ε

y y ( ) (ε ε)

y ε

x β

x - x β

x β

Wooldridge notation for data in deviations from group means

Page 40: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

40/68: Topic 1.3 – Linear Panel Data Regression

Least Squares Dummy Variable Estimator

b is obtained by ‘within’ groups least squares (group mean deviations)

Normal equations for a are D’Xb+D’Da=D’y

a = (D’D)-1D’(y – Xb)

iTi i t=1 it it ia=(1/T)Σ (y - )=ex b

Notes: This is simple algebra – the estimator is just OLS

Least squares is an estimator, not a model. (Repeat twice.)

Note what ai is when Ti = 1. Follow this with yit-ai-xit’b=0 if Ti=1.

Page 41: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

41/68: Topic 1.3 – Linear Panel Data Regression

Inference About OLS Assume strict exogeneity: Cov[εit,(xjs,cj)]=0. Every

disturbance in every period for each person is uncorrelated with variables and effects for every person and across periods.

Now, it’s just least squares in a classical linear regression model.

Asy.Var[b] = 2 N 2 N N 1i=1 i i=1 i i=1( / T)plim[( / T) ]

which is the usual estimator for OLS

i

i D iXM X

iTN 2

2 i=1 t=1 it i itNi=1 i

(y -a-x )ˆ

T - N - K

(Note the degrees of freedom correction)

b

Page 42: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

42/68: Topic 1.3 – Linear Panel Data Regression

Application Cornwell and Rupert

Page 43: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

43/68: Topic 1.3 – Linear Panel Data Regression

LSDV Results

Pooled OLS

Note huge changes in the coefficients. SMSA and MS change signs. Significance changes completely.

Page 44: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

44/68: Topic 1.3 – Linear Panel Data Regression

Estimated Fixed Effects

Page 45: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

45/68: Topic 1.3 – Linear Panel Data Regression

The Effect of the EffectsR2 rises from .26510 to .90542

Page 46: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

46/68: Topic 1.3 – Linear Panel Data Regression

Robust Covariance Matrix for LSDVCluster Estimator for Within Estimator

Effect is less pronounced than for OLS

Page 47: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

47/68: Topic 1.3 – Linear Panel Data Regression

Endogeneity in the FEM

yi = Xi + diαi + εi for each individual

1 1

2 2

N

=

=

1

2

N

y X d 0 0 0

y X 0 d 0 0 βε

α

y X 0 0 0 d

Xβ + Dα ε

Xβ + w

N

E[wi | Xi ] = g(Xi); Effects are correlated with included variables. Cov[xit,wi] ≠0X is endogenous because of the correlation between xit and wi

Page 48: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

48/68: Topic 1.3 – Linear Panel Data Regression

i

1

LSDV

1

LSDV

i i

Tii D i t=1 it,k i.,k it,l i.,lk,l

Define = .

(Looks like an IV estimator.)

(1) Plim ?Σ T

Plim (x -x )(x -x )

Nonsingular PD matrix if ther

D D

D

b XM X XM y

Z M X

b ZX Zy

ZX0

XM X

ii i D i i

i i i i i i

ii D

e is no multicollinearity and if

every column of has within group variation.

Σ (c )(2) Plim ? Plim Plim

Σ T Σ T Σ T

c because has no within group varia

X

XM iZw Zw= 0

M i=0 i

ii i D i

i i

tion

1Plim Σ by the assumption of the model.

Σ TXM 0

The within (LSDV) estimator is an instrumental variable (IV) estimator

Page 49: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

49/68: Topic 1.3 – Linear Panel Data Regression

LSDV is a Control Function Estimator

1

We seek a control function (.) such that | (.) is uncorrelated

with . (In the presence of (.), is not correlated with .)

Using the Frisch-Waugh theorem

=[ ]

Consider regressi

D D

h X h

w h X w

b XM X XM y

on of y on [ , ]. I.e., add group means to

the regression.

X X

Page 50: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

50/68: Topic 1.3 – Linear Panel Data RegressionLSDV is a Control Function Estimator

11 12 1K 11 1 12 1 11 1

21 22 2K 21 2 22 2 11 2

N1 N2 NK N1 N N2 N NK N

Consider regression of y on [ , ]. I.e., add group

means to the regression.

x x x

x x x[ , ]

x x x

= [

X X

x x x .i .i i

x x x .i .i iX X

x x x .i .i .i

X, ( - ) ]

= [ , ]

= [ , ]

Regression of y on [ , ] produces the LSDV estimator.

(See Appendix for a proof.)

D

D

I M X

X P X

X F

X X

Page 51: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

51/68: Topic 1.3 – Linear Panel Data Regression

The problem here is the estimator of the disturbance variance. The matrix is OK.Note, for example, .01374007/.01950085 (top panel) = .16510 /.23432 (bottom panel).

Page 52: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

52/68: Topic 1.3 – Linear Panel Data Regression

Page 53: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

53/68: Topic 1.3 – Linear Panel Data Regression

3. The Random Effects Model

The random effects model

ci is uncorrelated with xit for all t; E[ci |Xi] = 0

E[εit|Xi,ci]=0

it it i it

i i i i i

i i i i i i i

Ni=1 i

1 2 N

y = +c+ε , observation for person i at time t

= +c + , T observations in group i

= + + , note (c ,c ,...,c )

= + + , T observations in the sample

c=( , ,... ) ,

x β

y Xβ i ε

Xβ c ε c

y Xβ c ε

c c c Ni=1 iT by 1 vector

Page 54: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

54/68: Topic 1.3 – Linear Panel Data Regression

Random vs. Fixed Effects

Random Effects Small number of parameters Efficient estimation Objectionable orthogonality assumption (ci Xi)

Fixed Effects Robust – generally consistent Large number of parameters More reasonable assumption Precludes time invariant regressors

Which is the more reasonable model?

Page 55: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

55/68: Topic 1.3 – Linear Panel Data Regression

Mundlak’s Estimator

ii i i i i1 i1 iT i

i

i i i i i

i i i i

i i

Write c = u , E[c | , ,... ]

Assume c contains all time invariant information

= +c + , T observations in group i

= + + + u

Looks like random effects.

Var[ + u ]=

xδ x x x = xδ

y Xβ i ε

Xβ ixδ ε i

ε i Ω +

This is the model we used for the Wu test.

2i uσ ii

Mundlak, Y., “On the Pooling of Time Series and Cross Section Data, Econometrica, 46, 1978, pp. 69-85.

Page 56: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

56/68: Topic 1.3 – Linear Panel Data Regression

Mundlak Form of FE Model

+--------+--------------+----------------+--------+--------+----------+|Variable| Coefficient | Standard Error |b/St.Er.|P[|Z|>z]| Mean of X|+--------+--------------+----------------+--------+--------+----------+x(i,t) OCC | -.02021384 .01375165 -1.470 .1416 .51116447 SMSA | -.04250645 .01951727 -2.178 .0294 .65378151 MS | -.02946444 .01915264 -1.538 .1240 .81440576 EXP | .09665711 .00119262 81.046 .0000 19.8537815z(i) FEM | -.34322129 .05725632 -5.994 .0000 .11260504 ED | .05099781 .00575551 8.861 .0000 12.8453782Means of x(I,t) and constant Constant| 5.72655261 .10300460 55.595 .0000 OCCB | -.10850252 .03635921 -2.984 .0028 .51116447 SMSAB | .22934020 .03282197 6.987 .0000 .65378151 MSB | .20453332 .05329948 3.837 .0001 .81440576 EXPB | -.08988632 .00165025 -54.468 .0000 19.8537815Estimates: Var[e] = .0235632 Var[u] = .0773825

Page 57: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

57/68: Topic 1.3 – Linear Panel Data Regression

A “Hierarchical” Model

it it i it

i i i

it it i it

Lower level structural model

y c+ε

Upper level model for effects

c z + w

How does this affect the fixed effects model?

y α+ε

No change in the model, but it invites a second step

x β

δ

x β

.

Page 58: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

58/68: Topic 1.3 – Linear Panel Data Regression

Mundlak’s Approach for an FE Model

with Time Invariant Variables

it it i it

2it i i it i i

i i

2i i i i w

it it i it

y + c+ε , ( does not contain a constant)

E[ε | ,c ] 0,Var[ε | ,c ]=

c + + w ,

E[w| , ] 0, Var[w| , ]

y w ε

random effe

i

i

i i

i i

x β zδ x

X X

x θ

X z X z

x β zδ x θ

cts model including group means of

time varying variables.

Page 59: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

59/68: Topic 1.3 – Linear Panel Data Regression

Correlated Random Effects

ii i i i i1 i1 iT i

i

i i i i i

i i i i

i i1 1 i2 2

c = u , E[c | , ,... ]

Assume c contains all time invariant information

= +c + , T observations in group i

= + + + u

c =

xδ x x x = xδ

y X

Mundlak

Chamberlain/ Wooldri

β i ε

Xβ ixδ ε i

x δ x

dg

δ

e

iT T i

i i i1 1 i1 2 iT T i i

... u

= ... u+

TxK TxK TxK TxK etc.

Problems: Requires balanced panels

Modern panels have large T; models have large K

x δ

y Xβ ix δ ix δ ix δ i ε

Page 60: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

60/68: Topic 1.3 – Linear Panel Data Regression

LM Tests

+--------------------------------------------------+| Random Effects Model: v(i,t) = e(i,t) + u(i) | Unbalanced Panel| Estimates: Var[e] = .216794D+02 | #(T=1) = 1525| Var[u] = .958560D+01 | #(T=2) = 1079| Corr[v(i,t),v(i,s)] = .306592 | #(T=3) = 825| Lagrange Multiplier Test vs. Model (3) = 4419.33 | #(T=4) = 926| ( 1 df, prob value = .000000) | #(T=5) = 1051| (High values of LM favor FEM/REM over CR model.) | #(T=6) = 1200| Baltagi-Li form of LM Statistic = 1618.75 | #(T=7) = 887+--------------------------------------------------++--------------------------------------------------+| Random Effects Model: v(i,t) = e(i,t) + u(i) || Estimates: Var[e] = .210257D+02 | Balanced Panel| Var[u] = .860646D+01 | T = 7| Corr[v(i,t),v(i,s)] = .290444 || Lagrange Multiplier Test vs. Model (3) = 1561.57 || ( 1 df, prob value = .000000) || (High values of LM favor FEM/REM over CR model.) || Baltagi-Li form of LM Statistic = 1561.57 |+--------------------------------------------------+

REGRESS ; Lhs=docvis ; Rhs=one,hhninc,age,female,educ ; panel $

Page 61: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

61/68: Topic 1.3 – Linear Panel Data Regression

A One Way REM

Page 62: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

62/68: Topic 1.3 – Linear Panel Data Regression

A Hausman Test for FE vs. RE

Estimator Random EffectsE[ci|Xi] = 0

Fixed EffectsE[ci|Xi] ≠ 0

FGLS (Random Effects)

Consistent and Efficient

Inconsistent

LSDV(Fixed Effects)

ConsistentInefficient

ConsistentPossibly Efficient

Page 63: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

63/68: Topic 1.3 – Linear Panel Data Regression

Hausman Test for Effects

-1

d

ˆ ˆBasis for the test,

ˆ ˆˆ ˆ ˆ ˆWald Criterion: = ; W = [Var( )]

A lemma (Hausman (1978)): Under the null hypothesis (RE)

ˆ nT[ ] N[ , ] (efficient)

ˆ nT[

FE RE

FE RE

RE RE

FE

β - β

q β - β q q q

β - β 0 V

β d] N[ , ] (inefficient)

ˆ ˆˆNote: = ( )-( ). The lemma states that in the

ˆ ˆjoint limiting distribution of nT[ ] and nT , the

limiting covariance, is . But, =

FE

FE RE

RE

Q,RE Q,RE FE,R

- β 0 V

q β - β β β

β - β q

C 0 C C - . Then,

Var[ ] = + - - . Using the lemma, = .

It follows that Var[ ]= - . Based on the preceding

ˆ ˆ ˆ ˆ ˆ ˆH=( ) [Est.Var( ) - Est.Var( )] (

E RE

FE RE FE,RE FE,RE FE,RE RE

FE RE

-1FE RE FE RE FE RE

V

q V V C C C V

q V V

β - β β β β - β )

Page 64: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

64/68: Topic 1.3 – Linear Panel Data Regression

HausmanThere is a built in procedure for this.

It is not always appropriate to compare estimators this way.

Page 65: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

65/68: Topic 1.3 – Linear Panel Data Regression

A Variable Addition Test

Asymptotically equivalent to Hausman Also equivalent to Mundlak formulation In the random effects model, using FGLS

Only applies to time varying variables Add expanded group means to the regression

(i.e., observation i,t gets same group means for all t.

Use standard F or Wald test to test for coefficients on means equal to 0. Large F or chi-squared weighs against random effects specification.

Page 66: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

66/68: Topic 1.3 – Linear Panel Data Regression

Variable Addition

it i it it

it i it i

it it i

A Fixed Effects Model

y

LSDV estimator - Deviations from group means:

To estimate , regress (y y ) on ( )

Algebraic equivalent: OLS regress y on ( )

Mundlak interpretation:

x

x x

x , x

i i i

it i i it it

i it it i

u

Model becomes y u

= u

a random effects model with the group means.

Estimate by FGLS.

x

x x

x x

Page 67: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

67/68: Topic 1.3 – Linear Panel Data Regression

Application: Wu Test

NAMELIST ; XV = exp,expsq,wks,occ,ind,south,smsa,ms,union$NAMELIST ; (new) xmeans = expb,expsqb,wksb,occb,indb,southb,smsab,msb,unionb $CREATE ; xmeans = Group Mean(xv,pds=ti) $REGRESS ; Lhs = lwage ; Rhs = xmeans,Xv,ed,fem,one ; panel ; random ; Test: xmeans $

Page 68: 1/68: Topic 1.3 – Linear Panel Data Regression Microeconometric Modeling William Greene Stern School of Business New York University New York NY USA William

68/68: Topic 1.3 – Linear Panel Data Regression

Means Added