Fixed Effects estimation When there is an observed fixed effect. an alternative to first differences is fixed effects estimation ◆C onsider the average over time of vit Bxm+…+ Brink+a1+un o The average of a, will be a;, so if you subtract the mean a will be differenced out just as when doing first differences Economics 20- Prof anderson
Economics 20 - Prof. Anderson 1 Fixed Effects Estimation When there is an observed fixed effect, an alternative to first differences is fixed effects estimation Consider the average over time of yit = b1 xit1 +…+ bk xitk + ai + uit The average of ai will be ai , so if you subtract the mean, ai will be differenced out just as when doing first differences
Fixed Effects Estimation(cont) s If we were to do this estimation by hand we'd need to be careful because wed think that df=Nt-k, but really is NT-1-h because we used up dfs calculating means Luckily, Stata(and most other packages) will do fixed effects estimation for you o This method is also identical to including a separate intercept or every individual Economics 20- Prof anderson
Economics 20 - Prof. Anderson 2 Fixed Effects Estimation (cont) If we were to do this estimation by hand, we’d need to be careful because we’d think that df = NT – k, but really is N(T – 1) – k because we used up dfs calculating means Luckily, Stata (and most other packages) will do fixed effects estimation for you This method is also identical to including a separate intercept or every individual
First differences vs fixed Effects First differences and fixed effects will be exactly the same when T=2 For t>2. the two methods are different o Probably see fixed effects estimation more often than differences- probably more because it's easier than that it's better Fixed effects easily implemented for unbalanced panels, not just balanced panels Economics 20- Prof anderson
Economics 20 - Prof. Anderson 3 First Differences vs Fixed Effects First Differences and Fixed Effects will be exactly the same when T = 2 For T > 2, the two methods are different Probably see fixed effects estimation more often than differences – probably more because it’s easier than that it’s better Fixed effects easily implemented for unbalanced panels, not just balanced panels
Random effects Start with the same basic model with a composite error, yit=Bo+Bxit +.. BKritk +a+ u Previously we ve assumed that a, was correlated with the x's but what if it's not? OLS would be consistent in that case. but composite error will be serially correlated Economics 20- Prof anderson 4
Economics 20 - Prof. Anderson 4 Random Effects Start with the same basic model with a composite error, yit = b0 + b1 xit1 + . . . bk xitk + ai + uit Previously we’ve assumed that ai was correlated with the x’s, but what if it’s not? OLS would be consistent in that case, but composite error will be serially correlated
Random effects(continued) Need to transform the model and do gls to solve the problem and make correct inferences o Idea is to do quasi-differencing with the Economics 20- Prof anderson 5
Economics 20 - Prof. Anderson 5 Random Effects (continued) Need to transform the model and do GLS to solve the problem and make correct inferences Idea is to do quasi-differencing with the
Random effects(continued) Need to transform the model and do gls to solve the problem and make correct inferences o End up with a sort of weighted average of OLS and Fixed Effects -use quasi-demeaned data =1-g(2+7o2) yn-1=B0(1-)+B(xn-xn)+… +BK(k-xk+(v-v) Economics 20- Prof anderson 6
Economics 20 - Prof. Anderson 6 Random Effects (continued) Need to transform the model and do GLS to solve the problem and make correct inferences End up with a sort of weighted average of OLS and Fixed Effects – use quasi-demeaned data ( ) ( ) ( ) ( ) ( ) k itk i k i t i i t i i t i u u a x x y y x x T b b b + − + − − = − + − + = − + 1 ... 1 0 1 1 1 1 2 2 2 2
Random effects(continued) p If=l. then this is just the fixed effects estimator o If2=0, then this is just the OLS estimator So, the bigger the variance of the unobserved effect. the closer it is to fe The smaller the variance of the unobserved effect. the closer it is to ols Stata will do random effects for us Economics 20- Prof anderson 7
Economics 20 - Prof. Anderson 7 Random Effects (continued) If = 1, then this is just the fixed effects estimator If = 0, then this is just the OLS estimator So, the bigger the variance of the unobserved effect, the closer it is to FE The smaller the variance of the unobserved effect, the closer it is to OLS Stata will do Random Effects for us
Fixed effects or random? More usual to think need fixed effects since think the problem is that something unobserved is correlated with the x's If truly need random effects the only problem is the standard errors Can just adjust the standard errors for correlation within group Economics 20- Prof anderson 8
Economics 20 - Prof. Anderson 8 Fixed Effects or Random? More usual to think need fixed effects, since think the problem is that something unobserved is correlated with the x’s If truly need random effects, the only problem is the standard errors Can just adjust the standard errors for correlation within group
Other uses of panel methods e It's possible to think of models where there is an unobserved fixed effect. even if we do not have true panel data e A common example is where we think there is an unobserved family effect Can difference siblings o Can estimate family fixed effect model Economics 20- Prof anderson 9
Economics 20 - Prof. Anderson 9 Other Uses of Panel Methods It’s possible to think of models where there is an unobserved fixed effect, even if we do not have true panel data A common example is where we think there is an unobserved family effect Can difference siblings Can estimate family fixed effect model
Additional issues o Many of the things we already know about both cross section and time series data can be applied with panel data Can test and correct for serial correlation in the errors Can test and correct for heteroskedasticity Can estimate standard errors robust to both Economics 20- Prof anderson 10
Economics 20 - Prof. Anderson 10 Additional Issues Many of the things we already know about both cross section and time series data can be applied with panel data Can test and correct for serial correlation in the errors Can test and correct for heteroskedasticity Can estimate standard errors robust to both