Lecture 7A: Fixed Effect ModelApplied Micro-Econometrics,Fall 2020
Zhaopeng Qu
Nanjing University
12/3/2020
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 1 / 50
Panel Data: What and Why
Section 1
Panel Data: What and Why
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 2 / 50
Panel Data: What and Why
IntroductionSo far, we have only focused on data cross entities.Now it is the timeto add time, which leads us to use Panel Data.
A panel dataset contains observations on multiple entities, where eachentity is observed at two or more points in time.
If the data set contains observations on the variables π and π ,thenthe data are denoted
(πππ‘, πππ‘), π = 1, ...π πππ π‘ = 1, ..., π
the first subscript,π refers to the entity being observedthe second subscript,π‘ refers to the date at which it is observed
Whether some observations are missingbalanced panelunbalanced panel
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 3 / 50
Panel Data: What and Why
Introduction: Data Structure
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 4 / 50
Panel Data: What and Why
Example: Traffic deaths and alcohol taxes
Observational unit: one year in one U.S. state
48 U.S. states, so n = the number of entities = 48 and 7 years(1982,β¦, 1988),so T = # of time periods = 7. Balanced panel, sototal number of observations = 7 Γ 48 = 336Variables:
Dependent Variable: Traffic fatality rate (# traffic deaths in thatstate in that year, per 10,000 state residents)
Independent Variable: Tax on a case of beer
Other Controls (legal driving age, drunk driving laws, etc.)
A simple OLS regression model with π‘ = 1982, 1988
πΉππ‘ππππ‘π¦π ππ‘πππ‘ = π½0π‘ + π½1π‘π΅ππππ ππ₯ππ‘ + π’ππ‘
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 5 / 50
Panel Data: What and Why
U.S. traffic death data for 1982Higher alcohol taxes, more traffic deaths
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 6 / 50
Panel Data: What and Why
U.S. traffic death data for 1988Still higher alcohol taxes, more traffic deaths
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 7 / 50
Panel Data: What and Why
Simple Case: Panel Data with Two Time Periods
Let adjust our model with some unobservables
πΉππ‘ππππ‘π¦π ππ‘πππ‘ = π½0 + π½1π΅ππππ ππ₯ππ‘ + π½2ππ + π’ππ‘
where π’ππ‘ is the error term and π = 1, ...π πππ π‘ = 1, ..., πππ is the unobservable factor that determines the fatality rate in the πstate but does not change over time.
eg. local cultural attitude toward drinking and driving.
The omission of ππ might cause omitted variable bias but we donβthave data on ππ.
The key idea: Any change in the fatality rate from 1982 to 1988cannot be caused by ππ, because ππ (by assumption) does not changebetween 1982 and 1988.
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 8 / 50
Panel Data: What and Why
Panel Data with Two Time Periods:Before and After Model
Consider the regressions for 1982 and 1988β¦
πΉππ‘ππππ‘π¦π ππ‘ππ1988 = π½0 + π½1π΅ππππ ππ₯π1988 + π½2ππ + π’π1988πΉππ‘ππππ‘π¦π ππ‘ππ1982 = π½0 + π½1π΅ππππ ππ₯π1982 + π½2ππ + π’π1982
Then make a difference
πΉππ‘ππππ‘π¦π ππ‘ππ1988 β πΉππ‘ππππ‘π¦π ππ‘ππ1982 =π½1(π΅ππππ ππ₯π1988 β π΅ππππ ππ₯π1982) + (π’π1988 β π’π1982)
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 9 / 50
Panel Data: What and Why
Panel Data with Two Time Periods
Assumption: if πΈ(π’ππ‘|π΅ππππ ππ₯ππ‘, πππ‘) = 0,then (π’π1988 β π’π1982) isuncorrelated with (π΅ππππ ππ₯π1988 β π΅ππππ ππ₯π1982)Then this βdifferenceβ equation can be estimated by OLS, eventhough ππ isnβt observed.
Because the omitted variable ππ doesnβt change, it cannot be adeterminant of the change in π .
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 10 / 50
Panel Data: What and Why
Case: Traffic deaths and beer taxes
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 11 / 50
Panel Data: What and Why
Change in traffic deaths and change in beer taxes
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 12 / 50
Panel Data: What and Why
Wrap up
In contrast to the cross-sectional regression results, the estimatedeffect of a change in the real beer tax is negative, as predicted byeconomic theory.
By examining changes in the fatality rate over time, the regressioncontrols for fixed factors such as cultural attitudes toward drinkingand driving.
But there are many factors that influence traffic safety, and if theychange over time and are correlated with the real beer tax, then theiromission will produce omitted variable bias.
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 13 / 50
Panel Data: What and Why
Wrap up
This βbefore and afterβ analysis works when the data are observed intwo different years.
Our data set, however, contains observations for seven differentyears,and it seems foolish to discard those potentially usefuladditional data.
But the βbefore and afterβ method does not apply directly whenπ > 2. To analyze all the observations in our panel data set, we use amore general regression setting: fixed effects
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 14 / 50
Fixed Effects Model
Section 2
Fixed Effects Model
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 15 / 50
Fixed Effects Model
Introduction
Fixed effects regression is a method for controlling for omittedvariables in panel data when the omitted variables vary across entities(states) but do not change over time.
Unlike the βbefore and afterβ comparisons,fixed effects regression canbe used when there are two or more time observations for eachentity.
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 16 / 50
Fixed Effects Model
Fixed Effects Regression Model
The dependent variable (FatalityRate) and indenpendent variable(BeerTax) denoted as πππ‘ and πππ‘, respectively. Then our model is
πππ‘ = π½0 + π½1πππ‘ + π½2ππ + π’ππ‘ (7.1)
Where ππ is an unobserved variable that varies from one state tothe next but does not change over time
eg. ππ can still represent cultural attitudes toward drinking and driving.
We want to estimate π½1, the effect on Y of X holding constant theunobserved state characteristics Z.
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 17 / 50
Fixed Effects Model
Fixed Effects Regression Model
Because ππ varies from one state to the next but is constant overtime,then let πΌπ = π½0 + π½2ππ,the Equation becomes
πππ‘ = π½1πππ‘ + πΌπ + π’ππ‘ (7.2)
This is the fixed effects regression model, in which πΌπ are treatedas unknown intercepts to be estimated, one for each state. Theinterpretation of πΌπ as a state-specific intercept in Equation (7.2).
Because the intercept πΌπ can be thought of as the βeffectβ of being inentity π (in the current application, entities are states, the termsπΌπ,known as entity fixed effects.
The variation in the entity fixed effects comes from omitted variablesthat, like ππ in Equation (7.1), vary across entities but not over time.
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 18 / 50
Fixed Effects Model
Alternative : Fixed Effects by using binary variablesHow to estimate these parameters πΌπ.
To develop the fixed effects regression model using binary variables,let π·1π be a binary variable that equals 1 when i = 1 and equals 0otherwise, let π·2π equal 1 when i = 2 and equal 0 otherwise, and soon.
Arbitrarily omit the binary variable π·1π for the first group.Accordingly, the fixed effects regression model in Equation (7.2) canbe written equivalently as
πππ‘ = π½0 + π½1πππ‘ + πΎ2π·2π + πΎ3π·3π + ... + πΎππ·ππ + π’ππ‘ (7.3)
Thus there are two equivalent ways to write the fixed effectsregression model, Equations (7.2) and (7.3).
In both formulations, the slope coefficient on π is the same from onestate to the next.
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 19 / 50
Fixed Effects Model
Estimation and Inference
In principle the binary variable specification of the fixed effectsregression model can be estimated by OLS.
But it is tedious to estimate so many fixed effects.If π = 1000, thenyou have to estimate 1000 β 1 = 999 fixed effects.
There are some special routines, which are equivalent to using OLSon the full binary variable regression, are faster because they employsome mathematical simplifications that arise in the algebra of fixedeffects regression.
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 20 / 50
Fixed Effects Model
Estimation: The βentity-demeanedβ
Computes the OLS fixed effects estimator in two steps
The first step:take the average across times π‘ of both sides of Equation (7.2);
ππ = π½1οΏ½οΏ½π + πΌπ + οΏ½οΏ½π‘ (7.4)
demeaned: let Equation(7.2) minus (7.4)
πππ‘ β ππ = π½1πππ‘ β οΏ½οΏ½π + (πΌπ β πΌπ) + π’ππ‘ β οΏ½οΏ½π
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 21 / 50
Fixed Effects Model
Estimation: The βentity-demeanedβLet
πππ‘ = πππ‘ β ππ
οΏ½οΏ½ππ‘ = πππ‘ β οΏ½οΏ½ποΏ½οΏ½ππ‘ = π’ππ‘ β οΏ½οΏ½π
Then the second step: accordingly,estimateπππ‘ = π½1οΏ½οΏ½ππ‘ + οΏ½οΏ½ππ‘ (7.5)
Then the estimator is known as the within estimator. Because itmatters not if a unit has consistently high or low values of Y and X.All that matters is how the variations around those mean values arecorrelated.
In fact, this estimator is identical to the OLS estimator of π½1 withoutintercept obtained by estimation of the fixed effects model inEquation (7.3)
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 22 / 50
Fixed Effects Model
OLS estimator without interceptOLS estimator without intercept
ππ = π½1ππ + π’π
The least squared term
ππππ1
πβπ=1
οΏ½οΏ½2π =
πβπ=1
(ππ β π1ππ)2
F.O.C, thus differentiating with respect to π½1, we getπ
βπ=1
2(ππ β π1ππ)ππ = 0
At last,π½1 = π1 = βπ
π=1 ππππβπ
π=1 π2π
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 23 / 50
Fixed Effects Model
Fixed effects estimator(I)
The second step:πππ‘ = π½1οΏ½οΏ½ππ‘ + οΏ½οΏ½ππ‘ (7.4)
Then the fixed effects estimator can be obtained based on OLSestimator without intercept
π½ππ = βππ=1 βπ
π‘=1πππ‘οΏ½οΏ½ππ‘
βππ=1 βπ
π‘=1 οΏ½οΏ½2ππ‘
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 24 / 50
Fixed Effects Model
Fixed effect estimator(II)The fixed effects model is
πππ‘ = π½1πππ‘ + πΌπ + π’ππ‘ (7.2)
Equivalence to
πππ‘ = π½0 + π½1πππ‘ + πΎ2π·2π + πΎ3π·3π + ... + πΎππ·ππ + π’ππ‘ (7.3)
Then we can think of πΌπ as fixed effects or βnuisance parametersβ tobe estimated,thus yields
( π½, πΌ1, β¦ , πΌπ) = argminπ,π1,β¦,ππ
πβπ=1
πβπ‘=1
(πππ‘ β ππππ‘ β ππ)2
this amounts to including π = π + 1 β 1 dummies in regression of πππ‘on πππ‘
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 25 / 50
Fixed Effects Model
Fixed effect estimator(II)
The first-order conditions (FOC) for this minimization problem are:
πβπ=1
πβπ‘=1
(πππ‘ β π½πππ‘ β πΌπ)πππ‘ = 0
Andπ
βπ=1
πβπ‘=1
(πππ‘ β π½πππ‘ β πΌπ) = 0
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 26 / 50
Fixed Effects Model
Fixed effect estimator(II)
Therefore, for π = 1, β¦ , π ,
πΌπ = 1π
πβπ‘=1
(πππ‘ β π½πππ‘) = π π β ππ π½,
where
οΏ½οΏ½π β‘ 1π
πβπ‘=1
πππ‘; ππ β‘ 1π
πβπ‘=1
πππ‘
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 27 / 50
Fixed Effects Model
Fixed effect estimator(II)
Plug this result into the first FOC to obtain:
πβπ=1
πβπ‘=1
(πππ‘ β π½πππ‘ β πΌπ)πππ‘ =π
βπ=1
πβπ‘=1
(πππ‘ β πππ‘ π½ β π π + ππ π½)πππ‘
= (π
βπ=1
πβπ‘=1
(πππ‘ β π π)πππ‘)
β π½(π
βπ=1
πβπ‘=1
(πππ‘ β οΏ½οΏ½π)πππ‘) = 0
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 28 / 50
Fixed Effects Model
Fixed effect estimator(II)
Then we could obtain
π½ = βππ=1 βπ
π‘=1(πππ‘ β οΏ½οΏ½π)(πππ‘ β οΏ½οΏ½π)βπ
π=1 βππ‘=1(πππ‘ β π )(πππ‘ β οΏ½οΏ½π)
= βππ=1 βπ
π‘=1 οΏ½οΏ½ππ‘ πππ‘
βππ=1 βπ
π‘=1 οΏ½οΏ½2ππ‘
with time-demeaned variables οΏ½οΏ½ππ‘ β‘ πππ‘ β οΏ½οΏ½, πππ‘ β‘ πππ‘ β ππ
which is same as we obtained in demeaned method.
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 29 / 50
Fixed Effects Model
The Fixed Effects Regression Assumptions
The simple fixed effect model
πππ‘ = π½1πππ‘ + πΌπ + π’ππ‘, π = 1, ...π π‘ = 1, ..., π
1 Assumption 1: π’ππ‘ has conditional mean zero with πππ‘, or ππ at anytime and πΌπ
πΈ(π’ππ‘|ππ1, ππ2, ..., πππ , πΌπ) = 02 Assumption 2: (ππ1, ππ2, ..., πππ , π’π1, π’π2, ..., π’ππ ), π = 1, 2, ..., π are
π.π.π3 Assumption 3: Large outliers are unlikely.4 Assumption 4: There is no perfect multicollinearity.
For multiple regressors, πππ‘ should be replaced by the full listπ1,ππ‘, π2,ππ‘, ..., ππ,ππ‘
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 30 / 50
Fixed Effects Model
Statistical Properties
Unbiasedness and Consistency
π½ππ = βππ=1 βπ
π‘=1 οΏ½οΏ½ππ‘ πππ‘
βππ=1 βπ
π‘=1 οΏ½οΏ½2ππ‘
= βππ=1 βπ
π‘=1 οΏ½οΏ½ππ‘(π½1οΏ½οΏ½ππ‘ + οΏ½οΏ½ππ‘)βπ
π=1 βππ‘=1 οΏ½οΏ½2
ππ‘
= π½1 + βππ=1 βπ
π‘=1 οΏ½οΏ½ππ‘οΏ½οΏ½ππ‘
βππ=1 βπ
π‘=1 οΏ½οΏ½2ππ‘
It is very familiar: paralleling the derivation of OLS estimator, wecould prove the estimator of fixed effects model is unbiased andconsistent.
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 31 / 50
Fixed Effects Model
Statistical Properties
Similarly, in panel data, if the fixed effects regressionassumptionsβholds, then the sampling distribution of the fixedeffects OLS estimator is normal in large samples,
Then the variance of that distribution can be estimated from thedata, the square root of that estimator is the standard error,
And the standard error can be used to construct t-statistics andconfidence intervals.
Statistical inferenceβtesting hypotheses (including joint hypothesesusing F-statistics) and constructing confidence intervalsβproceeds inexactly the same way as in multiple regression with cross-sectionaldata.
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 32 / 50
Fixed Effects Model
Fixed Effects: Extension to multiple Xβs.
The fixed effects regression model is
πππ‘ = π½1π1,ππ‘ + ... + π½πππ,ππ‘ + πΌπ + π’ππ‘
Equivalently, the fixed effects regression can be expressed in terms ofa common intercept
πππ‘ =π½0 + π½1π1,ππ‘ + ... + π½πππ,ππ‘+ πΎ2π·2π + πΎ3π·3π + ... + πΎππ·ππ + π’ππ‘
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 33 / 50
Fixed Effects Model
Application to Traffic Deaths
The OLS estimate of the fixed effects regression based on all 7 yearsof data (336 observations), is
πΉππ‘ππππ‘π¦π ππ‘π = β 0.66π΅ππππ ππ₯ + ππ‘ππ‘ππΉ ππ₯πππΈπππππ‘π (0.29)
The estimated state fixed intercepts are not listed to save space andbecause they are not of primary interest.
As predicted by economic theory,higher real beer taxes are associatedwith fewer traffic deaths, which is the opposite of what we found inthe initial cross-sectional regressions.
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 34 / 50
Fixed Effects Model
Application to Traffic Deaths
Recall: The result in Before-After Model is
The magnitudes of estimate coefficients are not identical,because theyuse different data.
And because of the additional observations, the standard error now isalso smaller than before-after model.
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 35 / 50
Extension: Both Entity and Time Fixed Effects
Section 3
Extension: Both Entity and Time Fixed Effects
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 36 / 50
Extension: Both Entity and Time Fixed Effects
Regression with Time Fixed EffectsJust as fixed effects for each entity can control for variables that areconstant over time but differ across entities, so can time fixedeffects control for variables that are constant across entities butevolve over time.
Like safety improvements in new cars as an omitted variable thatchanges over time but has the same value for all states.
Now our regression model with time fixed effects
πππ‘ = π½0 + π½1πππ‘ + π½3ππ‘ + π’ππ‘
where ππ‘ is unobserved and where the single π‘ subscript emphasizesthat safety changes over time but is constant across states. Becauseπ½3π3 represents variables that determine πππ‘, if ππ‘ is correlated withπππ‘, then omitting ππ‘ from the regression leads to omitted variablebias.
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 37 / 50
Extension: Both Entity and Time Fixed Effects
Time Effects Only
Although ππ‘ is unobserved, its influence can be eliminated because itvaries over time but not across states, just as it is possible to eliminatethe effect of ππ, which varies across states but not over time.
Similarly,the presence of ππ‘ leads to a regression model in which eachtime period has its own intercept,thus
πππ‘ = π½1πππ‘ + ππ‘ + π’ππ‘
This model has a different intercept, ππ‘, for each time period, whichare known as time fixed effects.The variation in the time fixedeffects comes from omitted variables that vary over time but notacross entities.
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 38 / 50
Extension: Both Entity and Time Fixed Effects
Time Effects Only
Just as the entity fixed effects regression model can be representedusing π β 1 binary indicators, the time fixed effects regression modelbe represented using π β 1 binary indicators too:
πππ‘ = π½0 + π½1π1,ππ‘ + πΏ2π΅2π‘ + ... + πΏπ π΅ππ‘ + πΌπ + π’ππ‘ (10.18)
where πΏ2, πΏ3, ..., πΏπ are unknown coefficientswhere π΅2π‘ = 1 if π‘ = 2 and π΅2π‘ = 0 otherwise and so forth.
Nothing new, just a another form of Fixed Effects model with anotherexplanation.
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 39 / 50
Extension: Both Entity and Time Fixed Effects
Both Entity and Time Fixed Effects
If some omitted variables are constant over time but vary acrossstates (such as cultural norms) while others are constant across statesbut vary over time (such as national safety standards)
Then, combined entity and time fixed effects regression model is
πππ‘ = π½1πππ‘ + πΌπ + ππ‘ + π’ππ‘
where πΌπ is the entity fixed effect and ππ‘ is the time fixed effect.
This model can equivalently be represented as follows
πππ‘ =π½0 + π½1πππ‘ + πΎ2π·2π + πΎ3π·3π + ... + πΎππ·ππ+ πΏ2π΅2π‘ + πΏ3π΅3π‘ + ... + πΏπ π΅ππ + π’ππ‘
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 40 / 50
Extension: Both Entity and Time Fixed Effects
Both Entity and Time Fixed Effects: Estimation
The time fixed effects model and the entity and time fixed effectsmodel are both variants of the multiple regression model.
Thus their coefficients can be estimated by OLS by including theadditional time and entity binary variables.
Alternatively,first deviating Y and the Xβs from their entity andtime-period means and then by estimating the multiple regressionequation of deviated Y on the deviated Xβs.
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 41 / 50
Extension: Both Entity and Time Fixed Effects
Application to traffic deaths
This specification includes the beer tax, 47 state binary variables(state fixed effects), 6 single-year binary variables (time fixed effects),and an intercept, so this regression actually has 1 + 47 + 6 + 1 = 55right-hand variables!
When time effects are included,this coefficient is less preciselyestimated, it is still significant only at the 10%, but not the 5%.
This estimated relationship between the real beer tax and trafficfatalities is immune to omitted variable bias from variables that areconstant either over time or across states.
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 42 / 50
Extension: Both Entity and Time Fixed Effects
Autocorrelated in Panel Data
An important difference between the panel data assumptions in KeyConcept 10.3 and the assumptions for cross-sectional data in KeyConcept 6.4 is Assumption 2.
Cross-Section: Assumption 2 holds: i.i.d sample.Panel data: independent across entities but no such restricition withinan entity.
Like πππ‘ can be correlated over time within an entity, thusπΆππ£(ππ‘, ππ ) for some π‘ β π , then the ππ‘ is said to beautocorrelated or serially correlated.
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 43 / 50
Extension: Both Entity and Time Fixed Effects
Autocorrelated in Panel Data
In the traffic fatality example, πππ‘, the beer tax in state i in year t,isautocorrelated:
Most of the time, the legislature does not change the beer tax, so if itis high one year relative to its mean value for state i,it will tend to behigh the next year,too.
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 44 / 50
Extension: Both Entity and Time Fixed Effects
Autocorrelated in Panel Data
Similarly,π’ππ‘ would be also autocorrelated. It consists of time-varyingfactors that are determinants of πππ‘ but are not included asregressors, and some of these omitted factors might beautocorrelated. It can formally be expressed as
πΆππ£(π’ππ‘, π’ππ |πππ‘, πππ , πΌπ) β 0 πππ π‘ β π
eg. a downturn in the local economy and a road improvement project.
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 45 / 50
Extension: Both Entity and Time Fixed Effects
Autocorrelated in Panel Data
If the regression errors are autocorrelated, then the usualheteroskedasticity-robust standard error formula for cross-sectionregression is not valid.
The result: an analogy of heteroskedasticity.
OLS panel data estimators of π½ are unbiased and consistent but thestandard errors will be wrong
usually the OLS standard errors understate the true uncertainty
This problem can be solved by using βheteroskedasticity andautocorrelation-consistent(HAC) standard errorsβ
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 46 / 50
Extension: Both Entity and Time Fixed Effects
Standard Errors for Fixed Effects Regression
The standard errors used are one type of HAC standard errors,clustered standard errors.
The term clustered arises because these standard errors allow theregression errors to have an arbitrary correlation within a cluster, orgrouping, but assume that the regression errors are uncorrelatedacross clusters.
In the context of panel data,each cluster consists of an entity.Thusclustered standard errors allow for heteroskedasticity and forarbitrary autocorrelation within an entity, but treat the errors asuncorrelated across entities.
Like heteroskedasticity-robust standard errors in regression withcross-sectional data, clustered standard errors are valid whether ornot there is heteroskedasticity,autocorrelation,or both.
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 47 / 50
Extension: Both Entity and Time Fixed Effects
Application: Drunk Driving Laws and Traffic Deaths
Two ways to cracks down on Drunk Driving1 toughening driving laws2 raising taxes
Both driving laws and economic conditions could be omitted variables
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 48 / 50
Extension: Both Entity and Time Fixed Effects
Application: Drunk Driving Laws and Traffic Deaths
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 49 / 50
Extension: Both Entity and Time Fixed Effects
Wrap up
Weβve showed that how panel data can be used to control forunobserved omitted variables that differ across entities but areconstant over time.
The key insight is that if the unobserved variable does not changeover time, then any changes in the dependent variable must be due toinfluences other than these fixed characteristics.
Double fixed Effects model, thus both entity and time fixed effectscan be included in the regression to control for variables that varyacross entities but are constant over time and for variables that varyover time but are constant across entities.
Despite these virtues, entity and time fixed effects regression cannotcontrol for omitted variables that vary both across entities and overtime.There remains a need for a new method that can eliminate theinfluence of unobserved omitted variables.
Zhaopeng Qu (Nanjing University) Lecture 7A: Fixed Effect Model 12/3/2020 50 / 50