Understanding Fixed Effects in Panel Data Analysis
School
University of California, Los Angeles**We aren't endorsed by this school
Course
ECON 160
Subject
Economics
Date
Dec 12, 2024
Pages
27
Uploaded by JusticeWater68566
Recap: Panel DataFixed EffectsECON104: Data Science for EconomistsLecture 9bKimberly BoswellCollege of Social SciencesUCLAJuly 22, 2024Kimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists1 / 26
Recap: Panel DataFixed EffectsTable of Contents1Recap: Panel Data2Fixed EffectsLSDVFixed Effects EstimatorKimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists2 / 26
Recap: Panel DataFixed EffectsQuestionWhat is the primary advantage of using panel data in statisticalanalyses?(a)Panel data only require cross-sectional data, simplifying thedata collection process.(b)Panel data allow for the analysis of multiple individuals’behavior over time, providing insights into dynamics andchanges.(c)Panel data exclusively focus on time-series analysis, ignoringcross-sectional aspects.(d)Panel data eliminate the need for large sample sizes, makingthem ideal for small-scale studies.Kimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists3 / 26
Recap: Panel DataFixed EffectsAssumptionsThe first assumption we will relax is that the slope coeffcients areconstant but the intercept varies across units (individuals). Thenew regression model becomes:yit=β1i+β2x2it+β3x3it+eit(1)All behavioral differences between individuals, referred to asindividual heterogeneity, are assumed to be captured by theintercept.Kimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists4 / 26
Recap: Panel DataFixed EffectsThe Fixed Effect ModelUsually, other intercepts are added to properly ”control for” :•individual specific characteristics•time-invariant characteristicsThere are two main methods of estimating (1):1Least Squares Dummy Variable Estimator2Fixed Effects EstimatorKimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists5 / 26
Recap: Panel DataFixed EffectsLSDVOne method of controlling for individual-specific characteristics isthrough the addition ofdummy variables.D1i=1i= 10otherwise,D2i=1i= 20otherwise,In our example, we have 4 firms, so let us include dummies foreach in (??):yit=β11+β12D2i+β13D3i+β14D4i+β2x2it+β3x3it+eit(2)Since the least square estimators from (3) are BLUE, theestimators are known as theleast squares dummy variablesestimatorKimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists6 / 26
Recap: Panel DataFixed EffectsDummy Variable TrapWhy did we use 3 dummy variables instead of 4? When thenumber of dummies equals the number of categories, we fall preytomulticollinearity. We must ensure that for kindividuals/categories/units, we createk−1dummies to avoidfalling into this trap.In the example above, we omitted GM and used it as a referencevariable, i.e. the dummy coeffcients, tell us by how much theintercepts of GE, US, and West differ from the intercept of GM.You could omit any unit.Kimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists7 / 26
Recap: Panel DataFixed EffectsInterpreting the coeffcients of our fixed effect modelRecall that in our dummy variables model,yit=β11+β12D2i+β13D3i+β14D4i+β2x2it+β3x3it+eit(3)we omitted one dummy to avoid the multicollinearity issue. (Note:if we wanted explicit intercept values for each company, you canintroduce four dummy variables provided you run your regressionthrough the origin, that is, drop the intercept; if you do not dothis, you will fall into the dummy variable trap.)What is the interpretation of our coeffcients?Kimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists8 / 26
Recap: Panel DataFixed EffectsLSDV Model Coeffcients1:(a) Omitting one dummy(b)Including all dummies -interceptKimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists9 / 26
Recap: Panel DataFixed EffectsInterpretationRemember that Y is the level of investment of each firm,X2is thefirms market value (total price of outstanding shares, bothcommon and preferred) andX3is the capital stock (includes plantsand equipment).yit=β11+β12D2i+β13D3i+β14D4i+β2x2it+β3x3it+eit•β11represents the average level of gross investment whenmarket cap and capital stock equals zero (the constant).•β12estimates the common change/difference (to all years) inthe level of gross investment in firm 2 relative to firm 1,•β2is the estimated effect of market cap on investment,controlling for firm-specific time-invariant characteristics.(what we are most interested in)Kimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists10 / 26
Recap: Panel DataFixed EffectsLSDVAs usual, we can test the dummy intercepts to see their effcacythrough an F-test of joint significance against the pooled model.Recall that our pooled estimator has constant intercept and slope,whereas for the LSDV estimator, the former varies acrossindividuals, producing new coeffcients.H0:β11=β12=· · ·=β14(4)H1:Theβ1i’s are not all equalAnd in this case, our unrestricted model is our pooled model.Kimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists11 / 26
Recap: Panel DataFixed EffectsTime EffectsNow, we looked at unobserved heterogeneity across individuals, butwhat about across time?The Grunfeld investment function shifts over time because offactors such as technological changes, changes in governmentregulatory and/or tax policies, and external effects such as wars orother conflicts.Kimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists12 / 26
Recap: Panel DataFixed EffectsTime EffectsWe can control for this time heterogeneity using time dummies(again, omitting one to avoid the DVT) or by using thetwo-wayfixed effectestimator inplm.Kimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists13 / 26
Recap: Panel DataFixed EffectsConsiderations when using LSDV or Fixed Effects1If you introduce too many dummy variables, you will run intoa degree of freedom problem.2Variables that change little or not at all over time, such assome individual characteristics should not be included in afixed effects model because they produce collinearity with thefixed effects.(say we entered sex in the model; assuming thisdoes not change over time, the LSDV approach may not beable to identify the impact of such time-invariant variables)Kimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists14 / 26
Recap: Panel DataFixed EffectsAssumption 3Both the intercept and coeffcients vary across individuals. Thismeans that the investment function of GE, GM, US and WEST areall different. We can extend our LSDV model to handle thisscenario, by including the dummies in a multiplicative mannerinstead of an additive one.yit=β11+β12D2i+β13D3i+β14D4i+β2x2it+β3x3it+γ1(D2iX2it) +γ2(D2iX3it) +γ3(D3iX2it) +γ4(D3iX3it)+γ5(D4iX2it) +γ6(D4iX2it) +eit(5)Let’s sayβ2andγ1are statistically significant. This means thatthe slope coeffcient for Company 2 is (β2+γ1) suggesting thatthe slope of company 2 is different from the base companyKimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists15 / 26
Recap: Panel DataFixed EffectsPast Paper (iClicker)By including binary independent dummy variables which representeach group, this allows the _________ to differ for each group(a)slope(b)intercept(c)intercept and slope(d)marginal effect(e)None of the given answers are correctKimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists16 / 26
Recap: Panel DataFixed EffectsPast Paper (iClicker 2)Which of the following is a disadvantage of using the LSDV (LeastSquares Dummy Variable) approach for estimating a panel model?(a)This approach is not valid if the error term is correlated withone or more explanatory variables(b)This approach can only capture cross-sectional heterogeneityand not temporal variation in the dependent variable.(c)The LSDV approach assumes that all individual effects arerandom(d)The number of parameters to estimate may be large, resultingin a loss of degrees of freedom(e)None of the given answers are disadvantages of using theLSDV approach for estimating panel data.Kimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists17 / 26
Recap: Panel DataFixed EffectsFixed Effects EstimatorTake the data on individuali:yit=β1i+β2x2it+β3x3it+eit,t= 1, ...,T(6)Average the data across time:1TTXt=1yit=1TTXt=1(β1i+β2x2it+β3x3it+eit)Kimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists18 / 26
Recap: Panel DataFixed EffectsFixed Effects EstimatorUsing the fact that the parameters do not change over time, wecan simplify this as:yi=1TTXt=1yit=β1i+β21TTXt=1x2it(7)+β31TTXt=1x3it+1TTXt=1eit=β1i+β2x2i+β3x3i+eiThen subtract (6) from (7), term by term, to obtain:yit−yi=β2(x2it−x2i) +β3(x3it−x3i) + (eit−ei)(8)Kimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists19 / 26
Recap: Panel DataFixed EffectsFixed Effects Estimatoreyit=β2ex2it+β3ex3it+eit(9)So the regression estimates in (9) are from the demeaned data.For our Grunfeld example, we get:Kimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists20 / 26
Recap: Panel DataFixed EffectsNow, we know that the fitted least square regression passesthrough its mean, that is:yi=b1i+b2x2i+b3x3iSo we can use (21) to back out the different intercepts.b1i=y−b2x2i−b3x3i,i= 1, ...,N(10)The intercepts for our Grunfeld extract are as follows:This represents the time-invariant effect across different firms, i.e.individual heterogeneity.Kimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists21 / 26
Recap: Panel DataFixed EffectsWithin EstimationUses variation ”within” each unit/individual to estimate theparameters. Now, if there are NT observations and we areestimating 2 parameters, how many degrees of freedom would weexpect?Kimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists22 / 26
Recap: Panel DataFixed EffectsWithin EstimationUses variation ”within” each unit/individual to estimate theparameters. Now, if there are NT observations and we areestimating 2 parameters, how many degrees of freedom would weexpect?NT-N-2, because when subtraction the group means, we lose Nobservations.Kimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists22 / 26
Recap: Panel DataFixed EffectsStatistical SignificanceWe can test whether the unit intercepts are statistically significantusing an F-test.In this case:•H0: no fixed effects are needed (intercepts are insignificant)•H1: fixed effects are neededSincep∼0, we can reject the null and conclude that fixed effectsare needed and that the pooled estimator is insuffcient.Kimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists23 / 26
Recap: Panel DataFixed EffectsF Test for Pooled v FixedThe aforementioned test determines if all the parameters are thesame, i.e. there is no variation across groups. So do we need apooled model or fixed effect model.H0:β11=β12=· · ·=β14(11)H1:Theβ1i’s are not all equalAnd in this case, ourrestricted model is our pooled model. We stilluse our regular F-test formula, with some slight changes:F=(SSER−SSEU)/(N−1))SSEU/(NT−N−K)(12)Kimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists24 / 26
Recap: Panel DataFixed EffectsFixed EffectsFixed Effectsgets rid of (time-invariant) variation BETWEENindividuals, i.e.controls forindividuals, such that what is left isthe variation WITHIN individuals.Kimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists25 / 26
Recap: Panel DataFixed EffectsNext Class•Random Effects Model: error components model•Serial Correlation•Hausman-TaylorKimberly BoswellDepartment of Economics, UCLAECON104: Data Science for Economists26 / 26