Professional Documents
Culture Documents
With this we are saying to STATA that we have a panel data in which there are 3 cases with
three observations per year.
- We sort units and compute the unit-specific mean values for each variable
Bysort n: egen avg_y= mean(y)
Bysort n: egen avg_x= mean(x)
Bysort n: egen avg_t13 = mean(t13)
Bysort n: egen avg_t14 = mean(t14)
Bysort n: egen avg_t15 = mean(t15)
- Across units: cross-individual effects three cases with three observations each
one
- Across time: cross-time effects three individual values (for the three cases) per
each year
The problem here is the overestimation of the coeficients due to this model consider all
observations like a diferent subjects and this is not true because we dont have 9 individual
observations, we have 3 cases (groups) with three observations measured over time (three
years). And this assumption dont consider that there are some characterisctics non observed
which its individual errors are correlated with the observations. This is the reason why we
should use panel data.
Fixed effects
Interpretation of the coeficients: how much Y changes when X increases by one unit.
Random effects
This rest plot the difference between coeficients from models FE-RE to test if this differences
are significant or not:
- NO reject Ho we can use both models because they are consistent and comprable
(give as same inforamtion even the coeficients values are not the same)
- Reject Ho we can only use fixed effects.
To do it we should repeat:
Step 1: FE model xtreg y x t13 t14, fe
Step 2: store FE results est store fe
Step 3: RE model xtreg y x t13 t14, fe
Step 4: Hausman test hausman fe