Understanding Panel Data Analysis: Pooled Cross Sections vs. Fixed Effects, Lecture notes of Business

An overview of panel data analysis, focusing on the differences between pooled cross sections and fixed effects models. It discusses the use of time dummies, limitations of variables that vary only over time, and the estimation methods for pooled and fixed effects models. It also introduces random-effects models and their assumptions.

Typology: Lecture notes

2021/2022

Uploaded on 09/27/2022

sharina
sharina 🇬🇧

4.5

(11)

217 documents

1 / 9

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
~ 130 ~
Section 13 Models for Pooled and Panel Data
Data definitions
Pooled data occur when we have a “time series of cross sections,” but the
observations in each cross section do not necessarily refer to the same unit.
o HGL is ambiguous about this and sometimes use pooled to refer to panel
data
Panel data refers to samples of the same cross-sectional units observed at multiple
points in time. A panel-data observation has two dimensions: xit, where i runs from 1
to N and denotes the cross-sectional unit and t runs from 1 to T and denotes the time
of the observation.
o A balanced panel has every observation from 1 to N observable in every
period 1 to T.
o An unbalanced panel has missing data.
o Panel data commands in Stata start with xt, as in xtreg. Be careful about
models and default assumptions in these commands.
Asymptotic properties
o We need to be careful about large-sample properties of these estimators: are
we talking about N
, about T
, or both?
Regression with pooled cross sections
The crucial question with pooled cross sections from different time periods is “Does the
same model apply in each time period?”
o Has inflation changed the real values of some variables, requiring adjustment?
o Was the business cycle at different phases in different periods?
o Were there changes in technology or regulation that would cause behavior to be
different?
o Are there other factors that might cause coefficients in one period to differ from
those in others?
This is a special case of the Assumption #0 question: Do all observations come from the
same model?
Time dummy variables
o A very general way of modeling (and testing for) differences in intercept terms or
slope coefficients between periods is the use of time dummies.
o Including time dummies (for all but one, omitted date in the sample to avoid the
dummy-variable trap) alone allows the intercept to have a different value in each
period.
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download Understanding Panel Data Analysis: Pooled Cross Sections vs. Fixed Effects and more Lecture notes Business in PDF only on Docsity!

Section 13 Models for Pooled and Panel Data

Data definitions

 Pooled data occur when we have a “time series of cross sections,” but the observations in each cross section do not necessarily refer to the same unit. o HGL is ambiguous about this and sometimes use pooled to refer to panel data  Panel data refers to samples of the same cross-sectional units observed at multiple points in time. A panel-data observation has two dimensions: x (^) it , where i runs from 1 to N and denotes the cross-sectional unit and t runs from 1 to T and denotes the time of the observation. o A balanced panel has every observation from 1 to N observable in every period 1 to T. o An unbalanced panel has missing data. o Panel data commands in Stata start with xt, as in xtreg. Be careful about models and default assumptions in these commands.  Asymptotic properties o We need to be careful about large-sample properties of these estimators: are we talking about N → ∞, about T → ∞, or both?

Regression with pooled cross sections

 The crucial question with pooled cross sections from different time periods is “Does the same model apply in each time period?” o Has inflation changed the real values of some variables, requiring adjustment? o Was the business cycle at different phases in different periods? o Were there changes in technology or regulation that would cause behavior to be different? o Are there other factors that might cause coefficients in one period to differ from those in others?  This is a special case of the Assumption #0 question: Do all observations come from the same model?  Time dummy variables o A very general way of modeling (and testing for) differences in intercept terms or slope coefficients between periods is the use of time dummies. o Including time dummies (for all but one, omitted date in the sample to avoid the dummy-variable trap) alone allows the intercept to have a different value in each period.

 The estimated intercept term in the model with time dummies is the estimated intercept in the period with the omitted dummy.  The estimated coefficient on an included time dummy corresponding to a particular period is an estimate of the difference between the intercept in that period and the intercept in the omitted period.  A joint test of whether all the dummies’ coefficients are zero tests the hypothesis that the intercept does not vary at all over periods.  The simple test of whether a particular dummy’s coefficient is zero tests the hypothesis that the intercept in that dummy’s period does not differ from that of the omitted period. o Including interactions between time dummies and another variable Z allows the coefficient on (effect of) Z to vary across periods.  As before, the estimated coefficient on non-interacted Z is the estimated effect in the period for which the dummy is omitted.  The estimated coefficient on the interaction between Z and the dummy for period t is the estimated difference between the effect of Z in period t and the effect in the omitted period.  The joint test of the interaction terms tests the hypothesis that the coefficients (effects) of Z are the same in all periods.  The simple test of the interaction term for the period t dummy tests whether the effect of Z in period t differs from the effect in the omitted period.  Using aggregate variables that vary only over time (not across units) o Suppose that we think that the reason for variation in either the intercept or a slope coefficient across periods is due to changes in one particular variable (the aggregate unemployment rate, for example). o In this case, we can include that variable (for intercept effects) and perhaps interactions of that variable with some regressor Z (to capture effects on unemployment on the marginal effect of Z ). o Interpretation of these coefficients is standard for continuous interaction variables.  Limitations on variables that vary only over time o If we include time dummies, we cannot include any other variables that vary only over time.  Any variable that varies only over time can be expressed as a linear function of the dummies.  If there are two periods with unemployment = 4 in the first period and 6 in the second, then U = 4 + 2 D 2 , where D 2 is a dummy equal to one in the second period. Thus, including U , D 2 , and a constant will result in perfect multicollinearity.

o Introduce a dummy variable for each unit (individual) in sample:

1 1 2 2 3 3

N

yit   j  j D ji   i x it   i x it  eit

o We now have N + K – 1 regressors with NT observations. If T is moderately large (> 2 or 3) then we can get reliable estimates, but note computational difficulty: moment matrix is N + K – 1 × N + K – 1, which with N > 100 is probably computationally difficult.  Note that even if computing power is sufficient to blast through the problem, inverting very large matrices can be subject to more rounding error than simpler problems. o Can test the block of unit dummies to see if individual fixed effect is statistically significant.  Fixed-effects estimator using de-meaned data o yit   1 i   2 x (^) 2 it   3 x (^) 3 iteit o Averaging across T time periods for each unit i :

1 2 2 3 3 1 1 1 1 1 2 2 3 3

1 T^ 1 T^ 1 T^ 1 T

it i it it it t i t t i i i i i

y x x e T T T T y x x e

   

o Subtracting the means from the original equation yields

yit  yi   2  x 2 it  x 2 i    3  x 3 it  x 3 i    eit  ei or^ y  it^^ ^  2 x ^ 2 it   3 x  3^^ it  e  it^ where

the ~ indicates deviation from the unit mean o This is the “within-unit estimator”  It uses only variation over time within each unit to identify the coefficients  If one x varies mostly across units rather than over time, there is not going to be much information in the sample to allow it to be identified by fixed-effects estimation.  If a variable varies only across units (e.g., ethnicity or sex), then its effects cannot be identified at all in a fixed-effects model  All ~ values will be zero because each observation equals the unit mean.  This also happens in LSDV because the x in question will be perfectly collinear with the unit dummies. o The constant term is gone because both yit and xkit have zero means.  We can estimate the mean of the individual unit constant terms from “between unit estimator” yi^ ^    1 2 x 2^ i   3 x 3^ i ^  ei   1 i   1   We can calculate the estimated intercept for any individual unit as

ˆ^1 i  yi  ˆ^2 x 2 i  ˆ 3 x 3 i under the assumption that E  ei   0

o Degrees of freedom  Although there are NT observations on the ~ variables, only N ( T – 1) of them are independent.

 Should use ˆ 2  SSE /  NT  N  K  1 to reflect this: An FE estimator

will correct this but if you de-mean yourself and use OLS it will not.  Note that using LSDV will do this automatically because there will be N

  • 1 additional coefficients being estimated.

Time fixed effects

 If there are characteristics (especially unobserved ones) that are common to all units but vary across time, then we can use time fixed effects, which are just like the time dummies that we discussed in the pooling section.  The model is then Yit   1 X (^) it    t uit .We omit the constant term if all T dummies are

used to avoid collinearity; alternatively, we can omit the dummy for one time period.  The methods of estimation are identical to the unit fixed-effects model. o We can, equivalently  Estimate the model with time dummies, or  Estimate with y and x expressed as deviations from time-period means across units.  Any variable that varies only across time, and not across units, will be collinear with the dummy variables (or zero when de-meaned) and its effect cannot be estimated.  We can also combine both unit and time fixed effects. o Either LSDV with both unit and time dummies, or o Demeaning the data both with respect to time and with respect to units.  To do this, we calculate

  (^)     (^)   1

N it it i jt j it i t j

y y y y y y y y y
N 

 (^)    (^)       where (^) y is the

overall mean across both units and time, and regress it on a similarly transformed x.  This is sometimes called the “differences-in-differences” estimator because it excludes the effects of changes that are strictly over time (taken out with time dummies or demeaning) and the effects of changes that are strictly across units (taken out with unit dummies or demeaning). This leaves only differences across units in how the variables change over time to estimate .

Random-effects models

 The fixed-effects model thinks of  1 i as a fixed set of constants that differ across i.

o If we reject  (^2) u^  0 , then OLS is inefficient and we should use random effects (if assumptions are satisfied)  Estimation in presence of random effects o OLS is unbiased, but inefficient. Can use clustered standard errors to correct bias in standard errors. o Efficient FGLS estimator:  First use OLS residuals to estimate ^2 u and ^2 e.

 Calculate 1 2 e 2 T u e

 Transform model by “quasi-de-meaning”

1

it it i it kit kit ki it ij i

y y y x x x x k K v v v

 With this transformation, the v* error term is homoskedastic and not autocorrelated, so we can apply OLS to the transformed model to get efficient estimators  Note that the random-effects estimator = fixed-effects estimator if  = 1, which is the limit as T → ∞.

 Critical assumption of random-effects model is that the unit-specific error term (representing missing variables that are constant within each unit over time) are independent of the included regressors. o This is often not sensible.

Random effects or fixed effects?

 Fixed-effects models have the advantage of not requiring cov( x , u ) = 0, which is often difficult to justify. o Fixed-effects models are fully efficient as N gets large even if the true model is random effects.  However, standard fixed-effects models cannot identify the effects of any variables that vary only across units (and has difficulty identifying effects if most of the meaningful variation is across units).  Can do a Hausman test to examine whether the random-effects model is OK. (It is a nested sub-model of the fixed-effects model.) o The Hausman test is rejected if  The estimates are sufficiently different, and  The fixed-effects estimators are sufficiently precise. o Common decision rule: Use random-effects unless the Hausman test rejects it.

 Hausman-Taylor estimator (xthtaylor) o Applies IV methods to random-effects model to overcome the correlation between the regressors and the error term so that we can use RE estimation to estimate the effects of variables that do not vary across time within individuals o yit     1 2 x (^) it exog ,   3 x (^) it endog ,   4 wi exog (^) ,   5 wi endog (^) ,  uieit o The w variables do not vary over time for any individual, the x variables do o The number of xit,exog must be ≥ the number of wi,endog in order for identification to be possible. o This estimation uses the demeaned x (^) it,endog as instruments for the quasi-demeaned values and the means across time of x (^) it,exog as instruments for the wi,endog

SUR and panel data

 Panel estimation by random effects is a lot like SUR because we are taking account of the same kind of correlation across observations.  With small N and large T , it sometimes makes sense to treat the model as SUR and we can test whether the coefficients are the same across i as cross-equation coefficient restrictions.

Class demonstration?

 Dataset: S&W’s Seatbelts.dta o Show dataset o Define as panel  xtset fips year o Discuss missing values problem o Note two state identifiers, one alpha and one numeric  Following S&W’s Empirical Exercise E10. o Generate lnincome variable o Discuss expected results of regressing fatalityrate on sb_usage speed65 speed drinkage21 ba08 lnincome age  OLS regression o sb_usage has “wrong” sign  Authors argue that this is omitted variable bias and might be corrected partially by including state fixed effects. o Other effects are plausible o Send to outreg2 using fatal , word ctitle(OLS)  FE regression o Now sb_usage has the expected sign o Other variables decline in coefficient magnitude