Download Panel Data Analysis: Understanding Cross-Sectional and Time Series Effects and more Lecture notes Dynamics in PDF only on Docsity!
Lecture 15
Panel Data Models
- A panel, or longitudinal, data set is one where there are repeated observations on the same units: individuals, households, firms, countries, or any set of entities that remain stable through time.
- Repeated observations create a potentially very large panel data sets. With N units and T time periods Number of observations: NT. - Advantage: Large sample! Great for estimation. - Disadvantage: Dependence! Observations are, very likely, not independent.
- Modeling the potential dependence creates different models.
Panel Data Sets
- The National Longitudinal Survey (NLS) of Youth is an example. The same respondents were interviewed every year from 1979 to 1994. Since 1994 they have been interviewed every two years.
- Panel data allows us a researcher to study cross section effects –i.e., along N, variation across the firms- & time series effects –i.e., along T , variation across time.
Panel Data Sets
T T iT NT
t t it Nt
i N
i N
y y y y
y y y y
y y y y
y y y y
1 2
1 2
12 22 2 2
11 21 1 1 Time series
Cross section
- A standard panel data set model stacks the y i’s and the x i’s:
y = X + c + X is a Σi T ix k matrix is a k x1 matrix c is Σi T ix1 matrix, associated with unobservable variables. y and are Σi T ix1 matrices
Panel Data Sets
Tj Tj kT j
t t k
k
k
i
T T kT
t t k
k
k
iT
it
i
i
i
T
t
w w w
w w w
w w x
w w w
X
x x x
x x x
x x x
x x x
X
y
y
y
y
y
y
y
y
y
y
...
...
...
...
...
;....;
...
...
...
...
...
;....;
1 2
1 2 2
12 22 2
11 21 1
1 2
1 2 2
12 22 2
11 21 1
1
2
1
1
1
12
11
1
1 1 1
- With panel data we can study different issues:
- Cross sectional variation (unobservable in time series data) vs. Time series variation (unobservable in cross sectional data)
- Heterogeneity (observable and unobservable individual heterogeneity)
- Hierarchical structures (say, zip code, city and state effects)
- Dynamics in economic behavior
- Individual/Group effects (individual effects)
- Time effects
Panel Data Models
Panel Data Models: Example 1 - SUR
- In Zellner’s SUR formulation (no linear dependence on yit ) we have:
( A1 ) y it = x it ’ i + it
( A2 ) E[ i|X ] = 0,
( A3’ ) Var[ i|X ] = i^2 IT --groupwise heteroscedasticity.
E[it jt |X ] = ij --contemporaneous correlation E[it jt’ |X ] = 0 when t ≠ t’
( A4 ) Rank( X ) = full rank
- In ( A1 )- ( A4 ), we have the a GR model with heteroscedasticity. OLS in each equation is OK, but not efficient. GLS is efficient.
- We are not taking advantage of pooling –i.e., using NT observations!
- Use LR or F tests to check if pooling (aggregation) can be done.
Panel Data Models: Example 2 - Pooling
- Assumptions (A1) yit = x it ’ + z i ’ γ + it - the DGP i = 1, 2, ...., N - we think of i as individuals or groups. t = 1, 2, ...., T (^) i - usually, N >> T. ( A2 ) E[ i|X,z ] = 0, - X and z : exogenous ( A3) Var[ i | X,z ] = ^2 I. - Heteroscedasticity can be allowed. ( A4 ) Rank( X ) = full rank - We think of X as a vector of observed characteristics. For example, firm size, Market-to-book, Z-score, R&D expenditures, etc.
- We think of z as a vector of unobserved characteristics (individual effects ). For example, quality of management, growth opportunities, etc.
25
- Indices:
- i: individuals –i.e., the unit of observation–, - t: time period,
- j: observed explanatory variables,
- p: unobserved explanatory variables.
- Time trend t allows for a shift of the intercept over time, capturing time effects –technological change, regulations, etc. But, if the implicit assumption of a constant rate of change is strong (=δ), we use a set of dummy variables, one for each time period except reference period.
it
s
p
p pi
k
j
yit jXjit Z t 2 1
1
- The DGP ( A1 ) is linear:
Panel Data Models: Basic Model
30
- Strict exogeneity conditions on the whole history of x i. Under this assumption:
The βj’s are partial effects holding c constant.
- Violations of strict exogeneity are not rare. For example, if x it contains lagged dependent variables or if changes in it affect x it+1 (a “feedback” effect).
- But to estimate β we still need to say something about the relation between x it and c . Different assumptions will give rise to different models.
Panel Data Models: Basic Model
E y c X ci t
k
j
it it i ^ j jit 2
[ | x , ] 1
- The basic DGP: yit = x it ’ + z i ’ γ + it & ( A2 )-( A4 ) apply.
Depending on how we model the heterogeneity in the panel, we have different models.
(1) Pooled (Constant Effect) Model
z i ’γ is a constant. z i = α (and uncorrelated with x it !). Dependence on the yit may enter through the variance. That is, repeated observations on individual i are linearly independent. In this case,
yit = x it ’ + α + it
OLS estimates α and consistently. We estimate k+ 1 parameters.
Panel Data Models: Types
31
(2) Fixed Effects Model (FEM)
The z i’s are correlated with X i Fixed Effects:
E[ z i| X i] = g( X i) = α*i;
the unobservable effects are correlated with included variables –i.e., pooled OLS will be inconsistent.
Assume z i ’ γ = αi (constant; it does not vary with t ). Then,
yit = x it ’ + αi + it
the regression line is raised/lowered by a fixed amount for each indvidual i (the dependence created by the repeated observations!). In econometrics terms, this is the source of the fixed-effect s.
We have a lot of parameters: k + N. We have N individual effects! OLS can be used to estimates α and consistently.
Panel Data Models: Types
(3) Random Effects Model (REM)
The differences between individuals are random, drawn from a given distribution with constant parameters. We assume the z i’s are uncorrelated with the X i. That is,
E[ z (^) i | X i ] = μ (if X i contains a constant term, μ=0 WLOG).
Add and subtract E[ z i ’ γ ] = μ* from (*):
yit = x it ’ + E[ z i ’ γ ] +( z i ’ γ) - E[ z i ’ γ ] + it = x it ’ + μ* + u (^) i + it
We have a compound (“composed”) error –i.e., ui + it = wit. This error wit introduces contemporaneous cross-correlations across the i group.
OLS estimates μ and consistently, but GLS will be efficient.
Panel Data Models: Types
Assumptions for Asymptotics (Greene)
- Convergence of moments involving cross section X i.
Usually, we assume N increasing, T or T i assumed fixed.
- “ Fixed-T asymptotics” (see Greene)
- Time series characteristics are not relevant (may be nonstationary)
- If T is also growing, need to treat as multivariate time series.
- Rank of matrices. X must have full column rank.
X i may not, if T i < K.
- Strict exogeneity and dynamics. If x it contains yi,t-1 then x it cannot be strictly exogenous. X it will be correlated with the unobservables in period t-1. Inconsistent OLS estimates! (To be revisited later.)
- We can relax assumption ( A3 ). The new DGP model:
y = X * * + , with X * = [ X ι ] - Σi T ix( k +1) matrix. * = [ c]’ - ( k +1)x1 matrix
Now, we assume ( A3’ ) E[ '| X ] = Σ ≠ σ^2 I Σi T i
- Potentially, a lot of different elements in E[ '| X ] in a panel: - Individual heteroscedasticity. Usual groupwise heteroscedasticity_.
- Autocorrelation (Individual/group/firm) effects_. Errors have arbitrary correlation across time for a particular individual i :
- Temporal correlation (Time) effects. Errors have arbitrary correlation across individuals at a moment in time (SUR-type correlation).
- Persistent common shocks : Errors have some correlation between different firms in different time periods (but, these shocks are assumed to die out over time, and may be ignored after L periods).
Panel Data Models: (A3’) - No Homoscedasticity
- To understand the different elements in Σ , consider the following DGP for the errors, εit ’s:
εit = θ i’ f t + ηit , f t ~D(0, σf^2 ) & ηit = ϕ ηit-1 + ςit , ςit ~D(0, σςi^2 )
f t : vector of random factors common to all individuals/groups/firms.
θ i: vector of factor loadings, specific to individual i.
ςit : random shocks to individual i , uncorrelated across both i and t.
ηit : random shocks to i. This term generates autocorrelation effects in i.
- θ i’ f t generates both contemporaneous (SUR) and time-varying cross- correlations between i and j. (Autorrelations die out after L periods.)
- If f t is uncorrelated across t only contemporaneous (SUR) effects.
- If f t is persistent in t both SUR and persistent common effects.
Panel Data Models: (A3’) - Error Structures
- Different forms for E[ '| X ]: - Individual heteroscedasticity. E[i^2 | X ] = σi^2
standard groupwise heteroscedasticity driven by ςit.
- Autocorrelation (Individual) effects : E[itis | X ] ≠ 0 ( t≠s )
auto-/time-correlation for errors, it driven by ηit.
- Temporal correlation effects: E[itjt | X ] ≠ 0 ( i≠j )
contemporary cross-correlation for errors driven by f t.
- Persistent common shocks : E[itjs | X ] ≠ 0 ( i≠j ) and | t − s | < L
time-varying cross-correlation for errors driven by f t.
- Remark: Heteroscedasticity points to GLS efficient estimation, but, as before, for consistent inferences we can use OLS with (adjusted for panels) White or NW SE’s.
Panel Data Models: (A3’) - Error Structures
- We remove the dependence by assuming correlation within a cluster, but independence across clusters. That is, we think of the data as
Or stacking the data by cluster:
y g = X g + c g + g g = 1, ..., G.
- Easy extension of the White SE:
where w^2 ig,jg = E[ig jg | X g ] is the error covariance for the ig th^ and jg th observations. We use S0 to calculate clustered White SE.
'
0 ' [ ']
1 '^1 ,...,
if g g
if g g E
y c t g G
jig
ig jg
ig ig ig ig
x
Panel Data Models: (A3’) – Clustered SE
ig jg
G
g
ig
N
i
N
j
S w
g g , 2 1 1
0
x x 'jg
- Driscoll and Kraay (1998) provide an easy extension to estimate robust NW SE’s in panels with cross-sectional dependencies: Average the x t et over the clusters we suspect cause dependence.
- Within a cluster, we assume that the correlations within a cluster are the same for different observations.
- The K x K sandwich matrix is defined as
- The NW method is applied to the time series of cross-sectional averages of h it ( b ). We average over the G clusters to get G h t ( b ). We use the sandwich matrix to estimate clustered NW SE , using w( l ) as usual Bartlett or QS weights –other weights are OK.
Panel Data Models: (A3’) – PCSE
( )
1 1
^ ' ( ) ( )' with ( ) ( )
N t
i
t j t it
T
t j
X X ht bh b h b h b
- The NW method is applied to the time series of cross-sectional averages of h it ( b ). By using cross-sectional averages, estimated SE are consistent independently of the panel’s cross-sectional dimension N.
- Clearly, these clustered NW SE reduce to the usual NW SE if each cluster only has one observation.
- If we do not suspect autocorrelation problems –not rare, given that many panel data sets have heavy temporally spaced observations-, we can rely on White SE ( S 0 ).
- These clustered standard errors are called panel corrected SE (PCSE’s) or clustered SE. The clustered White-style SE are, sometimes, called Rogers SE.
Panel Data Models: (A3’) – PCSE
- These PCSE’s are robust to very general forms of cross-sectional (and temporal) dependence.
- These PCSE’s using HAR estimators (say, based on KVB SE) are also possible. (See Hansen (2007).
- Consistency of the PCSE is discussed by White (1984), Liang and Zegger (1986) for panels with finite number of observations per cluster, as G → ∞. Hansen (2007) shows that PCSE can be used with Ng→ ∞ –i.e., long panels–, in addition to G → ∞.
Panel Data Models: (A3’) – PCSE
Pooled Model
- General DGP y it = x it ’ + c i + it & ( A2 )-( A4 ) apply.
- The pooled model assumes that unobservable characteristics are uncorrelated with x it. We can rewrite panel DGP as:
y it = x it ’ + v i , where v i = c i + it c i (compound error)
To get a consistent estimator of , we need E[ x it ’ v i ] = 0.
Note: E[ x it ’ it ] is derived from (A2) E[it | x it , c ] = 0. Then, to get consistency, we need E[ x it ’ ci ] = 0 for all t.
- Given the assumptions, we can assume c i = α −a constant, independent of i. That is, no heterogeneity. Then:
y it = x it ’ + α + it CLM, with k +1 parameters.
Pooled Model
- We have the CLM, estimating k +1 parameters :
y it = x it ’ + α + it Pooled OLS is BLUE and consistent.
- Stacking the variables in matrices, we have:
y = X + α ι +
Dimensions:
− y, ι and are Σi T ix − X is Σi T ix k − is k x
- We can re-write the pooled equation model as:
y = X * * + , X * = [ X ι ] − Σi T ix( k +1) matrix: * = [ α]’ − ( k +1)x1 matrix
- In this context, OLS produces BLUE and consistent estimator. In this model, we refer to pooled OLS estimation
- Of course, if our assumption regarding the unobservable variables is wrong, we are in the presence of an omitted variable, c .
- Then, we have potential bias and inconsistency of pooled OLS. The magnitude of these problems depends on how the true model behaves: ‘fixed’ or ‘random.’
Pooled Model
- In the pooled model, there is no model for group/individual i heterogeneity. Thus, pooled regression may result in heterogeneity bias : Pooled regression: y (^) it = β 0 + β 1 x (^) it +ε it
True model: Firm 1
True model: Firm 2
True model: Firm 3
True model: Firm 4
y
x
- (^) •
(^) • •
- (^) • • - - - (^) •
Pooled Regression: Heterogeneity Bias
(^) jjj
i
k
j
y (^) i jxji 2
1
- There is an additional alternative to estimate , by expressing the model in terms of group/individual means. That is,
Pooled Regression: Between Transformation
- It is called the between estimator because it relies on variations between individuals (say, i & j ). We are estimating using the cross-sectional information in the data (the time-series individual i variation is gone!).
Obviously, if we are interested on the effect of a new independent BOD during the tenure of a CEO on that CEO’s compensation, between transformation will not work. But it will work well if we study the effect of gender on CEO’s compensation.
it
k
j
yit jxjit 2
1
- We lose observations (and power!): we have only N data points.
Remark: Under the usual assumptions, pooled OLS using the between transformation is consistent and unbiased.
Pooled Regression: Between Transformation
Useful Analysis of Variance Notation (Greene)
Ni=1 Tt=1 i^ it 2 Ni=1 Tt=1i it i 2 Ni=1 i i^2
Decomposition of Total variation: Σ Σ (z z) Σ ^ Σ (z z .) ^ Σ T z. z
Total variation = Within groups variation + Between groups variation
- Interpretation:
- Within group variation: Measures variation of individuals over time.
- Between group variation: Measures variation of the means across individuals.
- The variance (total variation) quantifies the idea that each individual i –say, each firm – differs from the overall average. We can decompose the variance into two parts: a within-group/individual part and a between group/individual part.
WHO Data (Greene)
Note: The variability is driven by between groups variation