Econ 582
Introduction to Pooled Cross Section and
Panel Data
Eric Zivot
May 22nd, 2012
Outline
Pooled Cross Section and Panel Data
Analysis of Pooled Cross Section Data
Two Period Panel Data
Multi-period Panel Data
Pooled Cross Section and Panel Data
Definition 1 (Pooled cross-section data) Randomly sampled cross sections of
individuals at dierent points in time
Example:
Current population survey (CPS) in 1978 and 1988
Definition 2 (Panel Data) Observe cross sections of the same individuals at
dierent points in time
Example: National Longitudinal Survey of Youth (NLSY)
Pooled Cross Section Data
Pooling makes sense if cross sections are randomly sampled (like one big
sample)
Time dummy variables can be used to capture structural change over time
Observations across dierent time periods allows for policy analysis
Example: Womens fertility over time (Wooldridge)
National Opinion Research Centers General Social Survey for even years from
1972-1984
= 0 + 174 + + 684 + 0x +
74 = 1 if year = 74 0 otherwise (year dummy)
x = ( 2 )
Q: After controlling for observable factors (educ etc), what has happened to
fertility over time?
A: Time eects of fertility are captured by dummy variables
[|x = 72] = 0 + 0x
[|x = 74] = 0 + 1 + 0x
[|x = 74] [|x = 72] = 1
Hence, 1 = change in fertility between 1972 and 1974 controlling for x
Some complications:
() may change over time. Best to use HC standard errors
Other coecients may not be constant over time
Example contd
To allow coecients on x to vary over time, add interaction terms with the
dummy variable:
= 0 + 174 + + 684 + 0x
01 (74 x) + + 6 (84 x) +
Then
[|x = 72] = 0 + 0x
[|x = 74] = 0 + 1 + ( + 1)0x
and
[|x = 74] [|x = 72] = 1 + 01x
Testing for Structural Change (Chow Test)
0 :
1 :
(no structural change) 1 = = 6 = 0 and 1 = = 6 = 0
(structural change) some 6= 0 and/or 6= 0
Use F-test or Wald test
Advisable to correct for possible heteroskedasticity
Policy Analysis with Pooled Cross Section Data
Pooled cross-sections can be useful for evaluating the impact of certain
events or policy interventions
Event or policy intervention must be a natural experiment - i.e., must
be exogenously imposed on data
Control variable must be exogenous (no endogenous regressors)
Example: Eect of Garbage Incinerator Location on House Values in North
Andover MA
2 year pooled cross section of data for 1978 and 1981
New incinerator built in 1981 and online in 1985
Knowledge of incinerator project not known in 1978
Q: Did house values near the incinerator decline in value?
Regression using 1981 data
= 0 + 1 +
= 101 307 30 688
(3093)
(5827)
= 1 if near incinerator, 0 otherwise
= 142 2 = 0665
Note
[| = 1 in 1981] [| = 0 in 1981]
= 1 = 30 688
Regression using 1978 data
d
= 82 517 18 824
(2653)
(5287)
2
= 142 = 0665
Note
[| = 1 in 1978] [| = 0 in 1978]
= 18 824
so that it appears that the incinerator was build in a low income/house value
area.
Dierence in Dierences (Di-in-Di) Estimate
To determine the impact of the incinerator on house values, we need to compare
the dierences between the treatment and control groups across the two time
periods (compute the dierence in the dierence)
[| = 1 in 1981] [| = 0 in 1981]
[| = 1 in 1978] [| = 0 in 1978]
= 30 688 (18 824)
= 11 863
Dummy Variable Formulation of Di-in-Di Estimation
= 0 + 081 + 1 + 1 (81 ) +
Then
[| = 1 81 = 1] = 0 + 0 + 1 + 1
[| = 0 81 = 1] = 0 + 0
81 = 1 + 1
[| = 1 81 = 0] = 0 + 1
[| = 0 81 = 0] = 0
78 = 1
81 78 = 1
Dummy variable regression results
d
= 82 517 + 18 790 81 18 824
(2726)
(4050)
(4875)
11 863 81
(7456)
1 = 11 863 = 81 78
11 863
1=0 =
= 159
7 456
Note: Dummy variable formulation allows the standard error on
1 to be computed.
Natural Experiment
Some exogenous event (e.g., change in government policy) changes the
environment in which individuals, families, firms, cities, etc., operate
Control group is not aected by the policy change
Treatment group is thought to be aected by the policy change
No random assignment to control and treatment groups
Group comparison
Group
Period 1 Period 2
Control
before
after
Di
Treatment before
after
Di
Di in Di
Two Period Panel Data
Observe cross section on the same individuals, cities, countries etc., in two
time periods = 1 and = 2
Panel data structure makes it possible to deal with certain types of endogeneity without the use of exogenous instruments
Extends the natural experiment framework to situations in which there may
be endogeneity
Example: Determine the eect of the unemployment rate on crime rates (Wooldridge)
Data on crime rates and unemployment for 46 cities for 1982 and 1987
Regression for 1982
d
= 12838 416 umemp
(2076)
(342)
2
= 46 = 0033
It appears that increases in unemp lowers crime rate (but not significant)
!
Bias likely due to omitted variables (unemp is endogenous)
Error Components Framework for Two Period Panel Data
= 0 + 02 + 0x + = 1 2
= 0 + 02 + 0x + ( + )
2 = 1 if = 2; 0 otherwise
= unobserved heterogeneity (fixed eect)
= idiosyncratic error
represents unobserved omitted variables that vary across individuals but
stay fixed over time (e.g., race, gender, ability)
x is endogenous if it is correlated with and pooled OLS is biased and
inconsistent
Example: Pooled OLS estimates in crime rate regression
d
= 9342 + 794 87 + 427
(1274)
(798)
(1188)
= 92 (46 x 2), 2 = 0012
unemp is not significant in pooled regression
It is likely that unemp is endogenous; e.g., correlated with omitted time
invariant city specific demographic variables like age, race, education levels,
attitudes towards crime etc.
Eliminating Endogeneity in Two Period Panel Data
= 0 + 02 + 0x + + = 1 2
Then
= 1 : 1 = 0 + 0x1 + + 1
= 2 : 2 = 0 + 0 + 0x2 + + 2
: = 0 + 02 + 2
First dierencing eliminates the unobserved fixed eect !
OLS on first dierenced data gives consistent estimates of (provided
2 is uncorrelated with 2 )
Example: First Dierence Estimates in crime rate regression
d
= 1540 + 222
(470)
(088)
= 46 2 = 127
222
=0 =
= 252
088
coef on is of expected sign and is significant
Potential Problems with First Dierence Regression
First dierencing removes variables that dont vary with time (e.g. gender,
race, etc.)
Eective sample size is reduced
Policy Analysis with Two-Period Panel Data
Two period panel data is often used for program evaluation studies in
which there is likely to be endogeneity
Example: Evaluation of Michigan Job Training Program
Data for two years (1987 and 1988) on the same manufacturing firms in
Michigan
Some firms received job training grants in 1988 and some did not (training
was available on first come first serve basis)
Panel data regression
= 0 + 0 88 + 1 + +
= scrap rate (% of items scrapped due to defects)
= 1 if firm received a training grant in 1988
= unobserved firm fixed eects (e.g. worker productivity)
( ) 6= 0 (why?)
First Dierence transformation
= 0 + 1 +
= 0 + 188 +
Here, 1 = average treatment eect
= [88|88 = 1] [87|88 = 1] = 0
= [88|88 = 0] [87|88 = 0] = 0
= 1
Example: First Dierences Regression
d = 564 739
(405)
(683)
2
= 54 = 022
1=0 =
739
= 108
683
Panel Data with More than 2 Time Periods
Suppose = 1 2 and 3
= 1 + 22 + 33 + 0x + +
2 = 1 if = 2; 0 otherwise
3 = 1 if = 3; 0 otherwise
Then
= 1 : 1 = 1 + 0x1 + + 1
= 2 : 2 = 1 + 2 + 0x2 + + 2
= 3 : 3 = 1 + 3 + 0x2 + + 3
First dierencing gives
= 1 + 22 + 33 + 02 + 2 = 2 3
That is,
= 2 : 2 = 2 + 02 + 2
= 3 : 3 = 2 + 3 + 02 + 3
because
23 = 23 22 = 1
Estimation is by pooled OLS on first dierenced data
Error terms for a given are correlated across time
(3 2 ) = (3 2 2 1 )
= (2 )
Hence, Gauss-Markov assumptions are violated and OLS is not ecient.