1 FE Panel Data assumptions
2 Assumption #1: E(u it |X i1,…,X iT, i ) = 0
3 Assumption #2: (X i1,…,X iT,Y i1,…,Y iT ), i =1,…,n, are i.i.d. draws from their joint distribution
4 Assumption #5: corr(u it,u is |X it,X is, i ) = 0 for t ≠s
5 Assumption #5 in a matrix:
6 Random Effects Panel Data model
7 Random Effects vs. Fixed Effects
8 Random Effects Panel Data model
9. use fatality. xtset state year panel variable: state (strongly balanced) time variable: year, 1982 to 1988 delta: 1 unit. gen vfr = mrall* xtreg vfr beertax, fe Fixed-effects (within) regression Number of obs = 336 Group variable: state Number of groups = 48 R-sq: within = Obs per group: min = 7 between = avg = 7.0 overall = max = 7 F(1,287) = corr(u_i, Xb) = Prob > F = vfr | Coef. Std. Err. t P>|t| [95% Conf. Interval] beertax | _cons | sigma_u | sigma_e | rho | (fraction of variance due to u_i) F test that all u_i=0: F(47, 287) = Prob > F = estimates store figs
10. xtreg vfr beertax, re Random-effects GLS regression Number of obs = 336 Group variable: state Number of groups = 48 R-sq: within = Obs per group: min = 7 between = avg = 7.0 overall = max = 7 Random effects u_i ~ Gaussian Wald chi2(1) = 0.18 corr(u_i, X) = 0 (assumed) Prob > chi2 = vfr | Coef. Std. Err. z P>|z| [95% Conf. Interval] beertax | _cons | sigma_u | sigma_e | rho | (fraction of variance due to u_i) estimates store rutabagas. hausman figs rutabagas ---- Coefficients ---- | (b) (B) (b-B) sqrt(diag(V_b-V_B)) | figs rutabagas Difference S.E beertax | b = consistent under Ho and Ha; obtained from xtreg B = inconsistent under Ha, efficient under Ho; obtained from xtreg Test: Ho: difference in coefficients not systematic chi2(1) = (b-B)'[(V_b-V_B)^(-1)](b-B) = Prob>chi2 =
11 What if Assumption #5 fails: so corr(u it,u is |X it,X is, i ) ≠ 0?
12 Standard Errors under FE
13 Sampling distribution of fixed effects estimator, ctd.
14 Sampling distribution of fixed effects estimator, ctd.
15 Case I: when u it, u is uncorrelated
16 Case II: u it and u is are correlated
17 Case II: Clustered Standard Errors
18 Comments on clustered standard errors:
19 Comments on clustered standard errors, ctd.
20 Comments on clustered standard errors, ctd.
21 Implementation in STATA
22 Case II: treat u it and u is as possibly correlated
23 Try adding year effects:
24
25. xtreg vfr beertax yr2 yr3 yr4 yr5 yr6 yr7, fe vce(cluster state) Fixed-effects (within) regression Number of obs = 336 Group variable: state Number of groups = 48 R-sq: within = Obs per group: min = 7 between = avg = 7.0 overall = max = 7 F(7,47) = 4.36 corr(u_i, Xb) = Prob > F = (Std. Err. adjusted for 48 clusters in state) | Robust vfr | Coef. Std. Err. t P>|t| [95% Conf. Interval] beertax | yr2 | yr3 | yr4 | yr5 | yr6 | yr7 | _cons | sigma_u | sigma_e | rho | (fraction of variance due to u_i) Remember, we should use xtreg: Exact same as, fe robust !!! Stata version 9 incorrect! Stata 10, 11 good Stock & Watson (2008), “Heteroskedasticity-Robust Standard Errors for Fixed Effect Panel Data Regression,” Econometrica, 76 (1): 155 – 74.
26 Application: Drunk Driving Laws and Traffic Deaths (Ruhm, J. Health Econ, 1996)
27 Drunk driving laws and traffic deaths, ctd.
28
29
30 The drunk driving panel data set
31 Why might panel data help?
32
33