Download presentation

Presentation is loading. Please wait.

Published byIsmael Pearce Modified over 2 years ago

1
1 Basic Econometrics (Econ 205) Should read Chapter 10 Panel data GH 5 due next Tue, and GH 6 due next Thur RAP should be progressing … Read Acemoglu, Johson, Robinson, and Yared (AER, 2008) for Tue March 20 th.

2
2 Regression with Panel Data (SW Chapter 10)

3
3 Notation for panel data

4
4 Panel data notation, ctd.

5
5 Why are panel data useful?

6
6 Example of a panel data set: Traffic deaths and alcohol taxes

7
7 A panel data set looks like this …

8
8 U.S. traffic death data for 1982:

9
9 U.S. traffic death data for 1988

10
10 Why might there be more traffic deaths in states that have higher alcohol taxes?

11
11 Panel Data with 2 Time Periods

12
12

13
13

14
14 FatalityRate v. BeerTax: Ziliak & McCloskey (2004)?

15
15 Fixed Effects Regression

16
16

17
17

18
18 The regression lines for each state

19
19

20
20 Two ways to write the fixed effects model

21
21 Estimation of Fixed Effects Models

22
22 1. n-1 binary regressors OLS regression

23
23 2. Entity-demeaned OLS regression

24
24 Entity-demeaned OLS regression, ctd.

25
25 Entity-demeaned OLS regression, ctd.

26
26 Example: Traffic deaths and beer taxes in STATA

27
Example: A better way in STATA 27. iis state. tis year. xtreg vfrall beertax, fe robust ; 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,47) = 5.05 corr(u_i, Xb) = Prob > F = (Std. Err. adjusted for 48 clusters in state) | Robust vfrall | Coef. Std. Err. t P>|t| [95% Conf. Interval] beertax | _cons | sigma_u | sigma_e | rho | (fraction of variance due to u_i) We should use xtreg in this case because those robust standard errors employ a small-sample correction designed for T fixed, n, while areg designed for n fixed, T (Cameron & Trivedi 2009, p. 253)

28
28 Example, ctd. For n = 48, T = 7:

29
29 By the way… how much do beer taxes vary?

30
30

31
31

32
32

33
33. bysort state: egen meantax = mean(beertax). gen devmean_beertax = beertax - meantax. list state year beertax meantax devmean_beertax | state year beertax meantax devmean~x | | | 1. | AL | 2. | AL | 3. | AL | 4. | AL | 5. | AL | | | 6. | AL | 7. | AL | 8. | AZ | 9. | AZ | 10. | AZ | | | 11. | AZ | 12. | AZ | 13. | AZ | 14. | AZ |

34
34

35
35. xtline beertax, overlay. xtline beertax if state==37 | state==45 | state==13 | state==41 | state==53 | state==56, overlay

36
36 Panel data with Time Fixed Effects

37
37 Time fixed effects only

38
38 Two formulations

39
39 Estimtation of Time fixed effects

40
40. tab year, gen(yr) Year | Freq. Percent Cum | | | | | | | Total | sum y* Variable | Obs Mean Std. Dev. Min Max year | yngdrv | yr1 | yr2 | yr3 | yr4 | yr5 | yr6 | yr7 |

41
41. xtreg vfr beertax yr2 yr3 yr4 yr5 yr6 yr7, fe robust 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)

42
42 Combining entity & time fixed effects

Similar presentations

© 2016 SlidePlayer.com Inc.

All rights reserved.

Ads by Google