Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Research Method Lecture 8 (Ch14) Advanced Panel Data Method ©

Similar presentations

Presentation on theme: "1 Research Method Lecture 8 (Ch14) Advanced Panel Data Method ©"— Presentation transcript:

1 1 Research Method Lecture 8 (Ch14) Advanced Panel Data Method ©

2 Fixed effects estimation 4Fixed effects estimation is another method to eliminate the time invariant unobserved effect. 4 Consider the following model Y it = β 0 +β 1 x it1 +β 2 x it2 +…+x itk +a i +u it ……. (1) The correlation between the fixed effect a i and the explanatory variables will cause biases in the estimated coefficients. 2

3 4Thus, we need to eliminate a i from the estimation. The first differencing is one method. Another method is the following. 4First, compute the sample average of variables for each individual. (That is, for i th individual, you compute the time series sample average of each variables). Then, you have the following 3 4Since a i is constant over time, a i term in the equation (2) does not have the over-bar.

4 4Now, subtract (2) from (1). Then, you get the following equation. 4 4Notice that, this transformation eliminates the fixed effect a i. This transformation is called the within transformation. Note also that this transformation eliminates the constant as well. 4Now, we simplify the notation by writing the above equation as: where. This is called the time-demeaned data on y. The same notation is used for the x- variables and u.

5 4Finally, estimate the demeaned equation (3) using OLS. This is called the fixed effect estimation. 4To repeat, you simply run the OLS for the following equation and it is called the fixed effect estimation.. 5 4Note that you do not have the intercept in this model.

6 The standard error for the fixed effect estimator 4Now, define the fixed effects residual as 6 4Then, the unbiased estimator of the sample variance is given by =Total # of observations. (T is the # of period, and N is the # of cross sectional units) # of parameters excluding the intercept # cross sectional units (# of individuals, firms etc)

7 4After computing the estimated sample variance, you can compute the standard errors for the parameters by applying the formula given in Handout 2. 4Notice that, if you manually create the time- demeaned variables and apply OLS, the usual statistical software will compute the degree of freedom as NT-k. This will understate the standard errors. 4 In this case, you have to correct the sample standard errors by multiplying each standard error by. 4Fortunately, STATA has a command that estimates the fixed effect model automatically with correct standard errors. 7

8 Estimating a i 4Sometimes (not often though), a i,itself is of interest. This can be easily estimated as: 8 4When you estimate a fixed effect model using STATA, STATA reports the `intercept’. Remember that, fixed effect does not have the intercept. What STATA is reporting is the average value of.

9 Example 4JTRAIN.dta is a three year panel data. In the first differenced model, we used only the first two years. Now use all the three years and estimate the following model. log(scrap) it = β 0 +β 1 (grant) it +β 2 log(sales) it +β 3 log(#employees) it +β 4 (year88) it +β 5 (year89) it +a i +u it Ex1. Estimate the model using OLS ignoring the presence of the fixed effect. Ex2. Estimate the model using the fixed effect model. 9

10 10 Ex1. OLS result

11 11 Fixed effect model

12 Ex3. The fixed effect model above did not show statistically significant effects of the grant. It is probably because it takes some time for the effect of grants to appear. In order to capture this possibility, include the lag of grant. That is, estimate the following model. log(scrap) it = β 0 +β 1 (grant) it +β 2 (grant) it-1 +β 3 log(sales) it +β 4 log(#employees) it +β 5 (year88) it +β 6 (year89) it +a i +u it 12 One year lag of the grant This is called the distributed lag model. The lag of the grant captures the effect of receiving grant last year on this year’s scrap rate.

13 13 Fixed effect model with one year lag of the grant The lag of grant has greater effect than current grant. This indicates that it takes time for the effect to appear.

14 Ex4. Finally, estimate the following fixed effect model by manually creating the time-demeaned variable. This is a good exercise for you to understand the exact procedure of the fixed effect estimation. log(scrap) it = β 0 +β 1 (grant) it +β 2 (year88) it +β 3 (year89) it +a i +u it 14

15 15 Fixed effect estimated automatically Fixed effect estimated by manually creating time-demeaned variables. Note the standard errors are wrong, so you have to correct them.

16 16 The do file ***************************** * Mannually estimating the * * fixed effect model * ***************************** sort fcode by fcode: egen meanlscrap=mean(lscrap) gen dmlscrap=lscrap-meanlscrap by fcode: egen meangrant=mean(grant) gen dmgrant=grant-meangrant by fcode: egen meand88=mean(d88) gen dmd88=d88-meand88 by fcode: egen meand89=mean(d89) gen dmd89=d89-meand89 ******************* *Estimate the model * ******************* reg dmlscrap dmgrant dmd88 dmd89 xtreg lscrap grant d88 d89, fe

17 4Note, when you estimate the fixed effect model, it is a good idea to tell your audience what the potential fixed effect would be and whether it is correlated with the explanatory variables. 4Off course, one can never tell exactly what the fixed effect is since it is the aggregate effects of all the unobserved effects. However, if you tell what is contained in the fixed effect, your audience can understand the potential direction of the bias, and why you need to use the fixed effect model. 17

18 The dummy variable regression 4Consider again the following model. log(scrap) it = β 0 +β 1 (grant) it +β 2 (year88) it +β 3 (year89) it +a i +u it We learned that fixed effect model can correct for the biases arising from the correlation between a i and the explanatory variables. 18

19 4Now, consider instead that you include all the firm dummy variables in the model, and estimate the model using the usual OLS. 4It is known that the slope coefficients and their standard errors obtained from this procedure are exactly the same as those obtained from the fixed effect estimation. 4The coefficients for dummy variables will be the same as the fixed effect estimates for a i. 19

20 4However, note that the coefficients for the dummy variables are not consistent when the number of periods (T) is fixed and the number of firms (N) gets large. This is because, when N gets large, the number of a i will increase. So no information accumulates on each a i. 20

21 The Random Effect Estimation 4Consider the following unobserved effect model. 4Previously, we applied the fixed effect estimation since we suspect that a i are correlated with some of the explanatory variables. 4But if we can assume that a i are not correlated with any of the explanatory variables, we can estimate the model more efficiently (i.e., get smaller standard errors). 21

22 4When a i are not correlated with any of the explanatory variables, pooled OLS will be consistent. 4But the problem is now the serial correlation. That is, for a given person i, the composite error term v it of this period and other periods are correlated. 22

23 4To be more precise, assume the following. Cov(x itj, a i )=0 for t=1,2,…,T, and j=1,2,…,k That is: a i is uncorrelated with all the explanatory variables in all the periods. 4In addition, we assume that a i and the idiosyncratic errors in all the periods are uncorrelated. 4Then we can show the following. 23 where σ a 2 =var(a i ) and σ u 2 =Var(u it ). Proof: See the front board.

24 4Here is a way to eliminate the serial correlation. 4Consider the following. 24 4Then, the term are not serially correlated. Thus, first consider the following.

25 4Then, subtract (2) from (1) to get, 25 4As can be seen, the composite error term is, and we know that this error term has no serial correlation. The transformed data are called the quasi-demeaned data. Therefore, if we apply the OLS to (3), we get the correct standard error. 4 One problem is that λ is an unknown parameter. So this has to be estimated.  The procedure to estimate λ is the following.

26 1. Estimate (1) using OLS. Then estimate σ a 2 σ u 2 σ v 2 and as: 26 2. Then estimate λ as: This is just the estimate of the sigma-squared estimated from the pooled OLS of (1). 3. Finally, replace λ in equation (3) with and estimate the equation using OLS. This is called the Random Effect Estimation.

27 Example 4Estimate a log wage equation using WAGEPAN.dta. Include in the model education, black, hispan, exper, exper squared, married, union, and full set of year dummies. 4First, estimate the model using OLS 4Next, estimate the model using the random effect. 4Finally estimate the model using the fixed effect model. Why does STATA drops some of the variables? 27

28 28 OLS

29 29 Random Effect

30 30 Fixed effect

31 Fixed effect or random effect 4Fixed effect estimation allows arbitrary correlation between a i and explanatory variables. Random effect is valid only if a i are uncorrelated with any of the explanatory variables. 4When you conduct a policy analysis, correlation should be considered as the rule rather than the exception. 4Thus fixed effect is almost always more convincing than the random effect. 31

32 4But if the policy variable is set experimentally, then you might apply random effect. For example, suppose that you want to know the effect of the class size on the students’ achievement. And if students are randomly assigned to classes of different size, then random effect can be applied. 4However, again, this kind of situation is rare. So, the usual recommendation is to use the fixed effect method. 32

Download ppt "1 Research Method Lecture 8 (Ch14) Advanced Panel Data Method ©"

Similar presentations

Ads by Google