EC395 Lab 6

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

1

EC395 Lab 6
Panel Data Analysis
Topics of Today’s exercise:

● Panel Data Analysis

● Fixed Effect Model

● Time Fixed Effect

● Testing for Heteroskedasticity and Autocorrelation with Panel Data

● Robust Cluster Standard Errors

First, you should download the data set from our webpage. This data file contains 19
variables which are listed in the following order
obs (n): 3580 time (T) = 5
id = identifier for panel individual; 716 total
year = year interviewed (1982, 1983, 1985, 1987, 1988)
lwage = ln(wage/GNP deflator)
hours = usual hours worked
age = age in current year
educ = current grade completed
collgrad = 1 if college graduate
msp = 1 if married, spouse present
nev_mar = 1 if never yet married
not_smsa = 1 if not SMSA
c_city = 1 if central city
south = 1 if south
black = 1 if black; 0 if white
union = 1 if union member
exper = total work experience
exper2 = exper^2
tenure = job tenure, in years
tenure2 = tenure^2

We are interested in the wage equation that relates the logarithm of WAGE to
EXPER, its square EXPER2 , SOUTH, and UNION.
1. Estimate the following OLS model and report the results
2
lwag e i=β 0 + β 1 expe r i + β 2 expe r i + β 3 sout h i+ β 4 unio ni +ui

© 2022 Wing H. Chan Wilfrid Laurier University EC395 Applied Econometrics


2

^ i=¿
lwage
2 2
N=R =R =¿
2. Estimate the following OLS model again with dummies for each individuals (OLS
fixed effect)
2
lwag e i=β 0 + β 1 expe r i + β 2 expe r i + β 3 sout h i+ β 4 unio ni +¿ effect +ui
^ i=¿
lwage
2 2
N=R =R =¿
3. Estimate the following model panel data command xtreg with fixed effect option
xtreg …., fe
2
lwag e i ,t =β 0 + β 1 expe r i ,t + β2 expe r i ,t + β 3 sout hi ,t + β 4 unio ni , t +α i +ui ,t
^ i ,t =¿
lwage
2
N=3580 R =0.137
4. Perform a test of overall significance
H 0 :all Bi=0 H 1 :atleast one of them does not equal 0

level of significance=¿ 0.05

F stat = 113.47 p-value = 0


Decision: We reject Bi=0

5. Test the significance of the fixed effects


H 0 :all Bfix effect=0 H 1: atleast one of B 2 does not equal 0

level of significance=0.05 df 1=q df 2=n−k

F stat = 19.66 p-value = 0


Decision: We reject the null hypothesis.
6. Estimate the model panel data with time fixed effects to eliminate OVB related to
variables changing across time, but not across individuals.
2
lwag e i ,t =β 0 + β 1 expe r i ,t + β2 expe r i ,t + β 3 sout hi ,t + β 4 unioni , t +α i +α t +ui ,t
^ i ,t =β 0+ β1 exper ❑i , t +2 expe r 2❑i , t + β 3 south❑i , t + β 4 unio ni ,t + α i +α t +ui , t
lwage

© 2022 Wing H. Chan Wilfrid Laurier University EC395 Applied Econometrics


3

2
N=R =¿
7. Test the significance of the time fixed effects
H 0:H1:

level of significance=df 1=df 2=¿

F stat = p-value =
Decision:
8. Test for groupwise heteroskedasticity
H 0:H1:

level of significance=0.05 df =716

Wald stat = 1.1e+0.6 ~ χ2(n) p-value = 0

Decision: We reject the null hypothesis


9. Re-estimate the model in part (c) using cluster-robust standard errors. the results.
2
lwag e i ,t =β 0 + β 1 expe r i ,t + β2 expe r i ,t + β 3 sout hi ,t + β 4 unio ni , t +α i +ui ,t

Δ %^
2
lwage i ,t =β 0+ β 1 expe r i ,t + β 2 expe r i , t + β 3 sout hi ,t + β 4 unio ni ,t +α i+u i ,t
2
N=R =¿
10. Test for first order autocorrelation
ui , t=ρ ui , t−1 +v i , t

H 0 : ρ=0 H 1 : ρ does not equal 0

level of significance=0.05 df 1=q df 2=n−k

F stat = 3.062 p-value =0.08


Decision: We do not reject because the p-value is bigger than level of significance
and we do not have autocorrelation.
11. Re-estimate the model in part (c) using cluster-robust standard errors and first lag
of log(wage).
2
lwag e i ,t =β 0 + β 1 expe r i + β 2 expe r i ,t + β3 sout hi , t + β 4 unio n i ,t + β 5 lwag ei , t−1 +α i ,t +u i ,t

Δ %^
2
lwage i ,t =β 0+ β 1 expe r i+ β 2 expe r i ,t + β 3 sout hi ,t + β 4 unio ni , t + β 5 lwag ei ,t −1+ α i , t +ui , t
2
N=2,864 R =0.1898

© 2022 Wing H. Chan Wilfrid Laurier University EC395 Applied Econometrics


4

12. What is the marginal effect of experience on wage rate?


a. the first equation tests the fixed effect and the equation does have fix effect
but the second function because of the probability of time fixed effect is 0.07
and we do not have time fixed effect. The marginal effect of experience on the
wage rate is change of lwage/change of experience is 0.0828+(-
0.0011)experience (DO derivative)

© 2022 Wing H. Chan Wilfrid Laurier University EC395 Applied Econometrics

You might also like