0% found this document useful (0 votes)
42 views46 pages

Topic 6 - FE, RE and Tests

Econ 7IE

Uploaded by

saien1moodley5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
42 views46 pages

Topic 6 - FE, RE and Tests

Econ 7IE

Uploaded by

saien1moodley5
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 46

ECON7IE

Topic 6: Panel data estimation

Fixed effects, random effects and


model selection tests
METHOD B2:
FIXED EFFECTS

Least squares dummy


variable estimator
4.3 Fixed effects (FE) estimation
• We want unbiased, consistent estimates of β:
– Therefore we must control for the fixed (individual-
specific) effects, i.
– First differencing is just one way of eliminating i.
• Alternatively:
– the fixed effects, i, can be estimated directly through the
use of (a) dummy variables
• Most commonly:
– (b) the fixed effects estimator (FE) also uses a
transformation to remove the unobserved effect, i, prior
to estimation.
• Both methods produce unbiased, consistent estimates of β.

3
(a) The Least Squares Dummy Variable
(LSDV) estimator
• We estimate the model in levels (not differences)
yit = Xit β + t + i + it
• Now we include a dummy variable for each observational
unit, to estimate i :
– Previously, we included a dummy variable for each time
period, to estimate t.
– Can also do both simultaneously.
• Now, the model becomes:
yit = 2d2it + 3d3it + … + NdNit + Xit β + t + it
• with cross-sectional unit 1 as the reference.
• But, may not be numerically feasible to estimate, especially
in short and wide panels (N is large):
– Addition of large number of dummies 4
• Our Stata example:
– Earnings data for 545 men for 8 years
– We need to add 544 dummy variables to this model!
• This is not practical
• (Household surveys may have more than 30 000
cross-sectional units)

• In addition:
– We are typically interested in β rather than i
• In practice:
– LSDV method is seldom used, except sometimes in
long and narrow panels (small N)
– e.g. a macro panel model may include a dummy for
each country
• Preferred method: Fixed Effects by time demeaning 5
METHOD B2:
FIXED EFFECTS
CONTINUED

Panel Data Part 5:


Time demeaning
5.1 Introduction
• We’ve seen that, in general, Fixed Effects is a method of
controlling for the fixed (individual-specific) effects, i.
– FE can prevent correlation between i and X from causing
heterogeneity bias
• We’ve seen:
– Method (a): Least Squares Dummy Variable estimator
• Includes a dummy variable for each observational unit,
to estimate i
• But not practical in datasets with large N
• Now we focus on:
– Method (b): Fixed Effects Time-Demeaning
• Preferred method
• Removes i from the model
7
5.2 Fixed effects: Time demeaning
• Consider again the equation of interest:
𝑦𝑖𝑡 = 𝑿𝑖𝑡 𝜷 + 𝜆2 𝐷2𝑡 + 𝜆3 𝐷3𝑡 + ⋯ + 𝜆 𝑇 𝐷𝑇𝑡 + 𝛼𝑖 + 𝜈𝑖𝑡 (5.1)
• For each i, the average of this equation over time is:
𝑦ഥ𝑖 = 𝑿𝑖 𝜷 + 𝜆2 𝐷2 + 𝜆3 𝐷3 + ⋯ + 𝜆 𝑇 𝐷𝑇 + 𝛼𝑖 + 𝜈ഥ𝑖 (5.2)
• Subtracting (5.2) from (5.1) gives:
𝑦𝑖𝑡 − 𝑦ഥ𝑖 = 𝑿𝑖𝑡 − 𝑿𝑖 𝜷 + 𝜆2 𝐷2𝑡 − 𝐷2 + 𝜆3 𝐷3𝑡 − 𝐷3 + ⋯
+𝜆 𝑇 𝐷𝑇𝑡 − 𝐷𝑇 + 𝛼𝑖 − 𝛼𝑖 + 𝜈𝑖𝑡 − 𝜈ഥ𝑖
𝑦ሷ 𝑖𝑡 = 𝑿ሷ 𝑖𝑡 𝜷 + 𝜆2 𝐷2ሷ 𝑖𝑡 + 𝜆3 𝐷3ሷ 𝑖𝑡 + ⋯ + 𝜆 𝑇 𝐷𝑇
ሷ 𝑖𝑡 + 𝜈ሷ 𝑖𝑡 (5.3)
where 𝑦ሷ 𝑖𝑡 = 𝑦𝑖𝑡 − 𝑦ഥ𝑖 is the time-demeaned data on 𝑦, etc.
• This method is called is Fixed Effects
– The time-demeaning transformation removes i
– β is also called the within estimator (it uses the variation
within each observational unit over time). 8
Some notes about FE estimation
1. If T = 2, first differencing and time-demeaning produce
identical estimates.

2. The degrees of freedom is given by


df = N(T – 1) – k
since we lose one df per observational unit in
calculating the means.

3. We can estimate the model on an unbalanced panel,


provided we have at least two obs. for each individual.
– But we will obtain unbiased estimates only if the data
are missing without selection.

9
4. Since 𝜷 is the coefficient on 𝑿ሷ 𝑖𝑡 = 𝑿𝑖𝑡 − 𝑿𝑖 , there must be
variation in 𝑿ሷ 𝑖𝑡 in order to identify β:
– We cannot estimate the effect on y of anything that:
• Remains constant over time (e.g. race)
• Changes at a constant rate over time (e.g. age)
– We can include interactions between such variables and
the time dummies:
• Assess whether returns to such characteristics
change over time.
– FE estimator is robust to the omission of any time-
invariant regressors.
– Being able to estimate a coefficient precisely depends on
the amount of variation in 𝑿ሷ 𝑖𝑡
• Less variation (i.e. 𝑿𝑖𝑡 seldom deviates from its mean)
→ wide confidence intervals
10
If Xj is a continuous variable:
• Lack of variation not usually a problem
Variation
in 𝑿ሷ 𝑖𝑡 ?
If Xj is a categorical variable:
• Be careful about potential lack of variation
• Call those who change their Xj value ‘switchers’
– If dataset has no switchers: cannot determine effect of Xj
on y.
– If dataset has few switchers: effect of Xj on y is
estimated based only on those who switch.
• May not be representative of all individuals with
characteristic Xj.
– E.g. are people who change their marital status
representative of all married people?
• Also likely that the effect will not be estimated very
precisely.
11
5.3 Properties of FE
• Like FD, the strict exogeneity assumption applies to it :
– E(it | Xit , i) = 0 , t = 1,... ,T

• Provided that this assumption holds, then:


– The estimates of β will be unbiased.
– They will also be consistent as T → .

• Main advantage of FE: it is unbiased in the presence of


correlation between i and Xit in any period
– Because FE transformation removes i

12
Stata example
• Earnings data for 545 men in the US from 1980 – 1987
– (see previous slides for details)
• We estimate a fixed effects model for the log of wages.
• Recall: we cannot include race, education or experience.
• We include: experience squared and dummies for union,
married and the years 1981-1987 (with 1980 as base year).
• Do we observe much switching of union status?
– Use transition matrix in Stata:
. xttrans union
status in next wave
=1 if in =1 if in union
union 0 1 Total

status in 0 91.12 8.88 100.00


one wave 1 27.25 72.75 100.00

Total 75.70 24.30 100.00

13
. xtreg lwage expersq married union d81 d82 d83 d84 d85 d86 d87, fe

Fixed-effects (within) regression Number of obs = 4360


Group variable: nr Number of groups = 545

R-sq: within = 0.1806 Obs per group: min = 8


between = 0.0286 avg = 8.0
overall = 0.0888 max = 8

F(10,3805) = 83.85
corr(u_i, Xb) = -0.1222 Prob > F = 0.0000

lwage Coef. Std. Err. t P>|t| [95% Conf. Interval]

expersq -.0051855 .0007044 -7.36 0.000 -.0065666 -.0038044


married .0466804 .0183104 2.55 0.011 .0107811 .0825796
union .0800019 .0193103 4.14 0.000 .0421423 .1178614
d81 .1511912 .0219489 6.89 0.000 .1081584 .194224
d82 .2529709 .0244185 10.36 0.000 .2050963 .3008454
d83 .3544437 .0292419 12.12 0.000 .2971125 .4117749
d84 .4901148 .0362266 13.53 0.000 .4190894 .5611402
d85 .6174823 .0452435 13.65 0.000 .5287784 .7061861
d86 .7654966 .0561277 13.64 0.000 .6554532 .8755399
d87 .9250249 .0687731 13.45 0.000 .7901893 1.059861
_cons 1.426019 .0183415 77.75 0.000 1.390058 1.461979

sigma_u .39176195
sigma_e .35099001
rho .55472817 (fraction of variance due to u_i)

F test that all u_i=0: F(544, 3805) = 9.16 Prob > F = 0.0000
14
Output:
• What Stata calls u_i is the individual-specific fixed effect i
– technically, it’s all time-invariant variables and i
• F test for existence of fixed effects:
– H0: 1 = 2 = … = 0
– Compares FE and OLS to see how much FE can
improve the goodness-of-fit
– Reject H0 (p=0.000), so there is a significant fixed effect
– Therefore, FE is ‘better’ than POLS.

• FE estimator is robust to any correlation between u_i and


Xb, so the estimates it produces are unbiased
– provided strict exogeneity of remaining error term holds.

15
Interpretation:
• Interpret the coefficients as you would in an OLS model:
– On average, belonging to a union significantly increases
wages by 100 𝑒 0.080 − 1 = 8.33% compared to non-union
member c.p., after removing individual heterogeneity.

• How do these estimates compare to POLS?


Variable OLS FE

educ 0.091***
black -0.139***
hisp 0.016
exper 0.067***
expersq -0.002** -0.005***
married 0.108*** 0.047*
union 0.182*** 0.080***

legend: * p<0.05; ** p<0.01; *** p<0.001

– OLS substantially overestimates the effects of union


membership and marriage on earnings, compared to FE
16
• When we remove the unobserved heterogeneity using FE,
the union wage premium and marriage premium falls.
– This suggests that the unobserved effects, i, are
strongly positively correlated with both married and
union.
• E.g. in OLS, married men earn much more than unmarried
men
– But men who are more ‘able’ may be more likely to be
married (and they also earn higher wages).
– Once we remove this unobserved effect using FE, the
remaining premium is less than half the original size
– It captures effects such as:
• marriage may increase men’s productivity (by
specialising in market work)
• being married sends a signal of stability, for which
employers may pay a premium
17
5.4 Overview
The topics covered thus far:
A. POLS Slides pt 3

B. FE-type methods:
• FD
Slides pt 4
• LSDV
• FE time demeaning Slides pt 5

C. Random effects Slides pt 6

Now try class exercise Q1 (or wait for class) 18


METHOD C:
RANDOM EFFECTS
ESTIMATION

Panel Data Part 6


6.1 Introduction & recap
• Recall that we are trying to estimate the model:
yit = Xit β + i + eit eit = t + it
where i is the fixed effect or unobserved individual
heterogeneity and eit is the time-varying error term (from the
composite error term uit = i +t +it).
• If i is correlated with Xit:
– estimates of β will be biased unless we control for i.
• We used fixed effects (time-demeaning) to eliminate i (and
any other time-invariant effects) from the estimation
• Remaining error term eit must not be correlated with Xit in
any time period:
– Assumption of strict exogeneity
– Estimates of β are unbiased, consistent (as T → )
20
But: A drawback of using FE
• In using FE, the goal is to eliminate i:
– because expect i is correlated with at least one of Xit.
• But what if we think i is uncorrelated with each Xj in all
time periods?
– i.e. if we believe that i is random?
• Then FE transformation to eliminate i results in
inefficient estimators.
– i.e. confidence intervals may be wide
– variation in estimate of β from sample to sample.
• The inefficiency is particularly severe when:
– T is small, or
– Xit doesn’t vary much, relative to variation in yit.
21
6.2 Random effects
• The model becomes a random effects (RE) model when
we assume i is random:
yit = Xit β + i + eit
• Treat the individual-specific heterogeneity as randomly
distributed across the population
– i.e. uncorrelated with Xit

• Now, we must assume:


– E[eit| Xit, i] = 0 (strict exogeneity)
and also
– E[i | Xit] = 0

22
How should we estimate β?
If we believe cov(i , Xit) = 0:
• We don’t need to control for i when estimating β
– We can estimate β consistently using a single cross-
section (i.e. no need for panel data).
– But this disregards useful information from other time
periods if we actually have a panel.

• We can also get consistent estimates from pooled OLS, with


time dummies. But this ignores a key feature of the model:
– Recall the composite error term is uit = t + i +it.
– i is part of the composite error in every t:
• So: uit is positively serially correlated across time.
– In pooled OLS: standard errors and usual test statistics
will thus be incorrect.
23
6.3 Estimation of RE model

• We use a generalized least squares estimator (GLS)


• This transforms our model to eliminate serial correlation in
the error term:
( )
y it −  y i = (1−  )β01 + X it −  X i β + (1−  ) i + (eit −  ei ) (6.1)

• This is referred to as a quasi-demeaned model:


– RE subtracts a fraction (i.e.  ) of the within-time
average.

24
Theta and model type:
1
 σ 
2 2

 = 1−  2 e
2
0  1 (6.2)
σ
 e + Tσ  

where σe2 and σ2 are the variances of eit and i respectively.

• If  = 1, the model is FE
– Complete time-demeaning
• If  = 0, the model is pooled OLS
– Occurs if all individual effects are equal (σ2 = 0).
• If 0 <  < 1, the model is RE
–  approaches 1 as σ2 (the variability in i) grows,
relative to σe2 (the variability in the time-varying error).
– As T increases,  → 1.
25
6.4 Properties of RE
• Unbiased, provided Xit is independent of all i and eit
• More efficient than FE under the RE assumptions
• Consistent for T → ∞ (or N → ∞ with T fixed)

• Random effects estimation allows for the inclusion of


variables that are fixed over time or change at a constant
rate over time.
– This is because RE assumes that i is uncorrelated with
all Xit
– This is one major advantage of RE over FE

• But if cov(i , Xit) ≠ 0, then RE β will be biased and we will


have to use the FE estimator.
26
6.5 Stata example
• Same example as previously: balanced panel of earnings
data for 545 men in the US from 1980 – 1987.
• Using RE, we can include:
– time-invariant characteristics (race, education), and
– characteristics that change at the same rate for all
individuals (experience, in this dataset).
• As for FE:
– Include a full set of time dummies: allow for systematic
changes over time
– But omit dummy for base year 1980

27
. xtreg lwage educ black hisp exper expersq married union d81 d82 d83 d84 d85
> d86 d87, re theta

Random-effects GLS regression Number of obs = 4360


Group variable: nr Number of groups = 545

R-sq: within = 0.1799 Obs per group: min = 8


between = 0.1860 avg = 8.0
overall = 0.1830 max = 8

Random effects u_i ~ Gaussian Wald chi2(14) = 957.77


corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000
theta = .64291089

lwage Coef. Std. Err. z P>|z| [95% Conf. Interval]

educ .0918763 .0106597 8.62 0.000 .0709836 .1127689


black -.1393767 .0477228 -2.92 0.003 -.2329117 -.0458417
hisp .0217317 .0426063 0.51 0.610 -.0617751 .1052385
exper .1057545 .0153668 6.88 0.000 .0756361 .1358729
expersq -.0047239 .0006895 -6.85 0.000 -.0060753 -.0033726
married .063986 .0167742 3.81 0.000 .0311091 .0968629
union .1061344 .0178539 5.94 0.000 .0711415 .1411273
d81 .040462 .0246946 1.64 0.101 -.0079385 .0888626
d82 .0309212 .0323416 0.96 0.339 -.0324672 .0943096
d83 .0202806 .041582 0.49 0.626 -.0612186 .1017798
d84 .0431187 .0513163 0.84 0.401 -.0574595 .1436969
d85 .0578155 .0612323 0.94 0.345 -.0621977 .1778286
d86 .0919476 .0712293 1.29 0.197 -.0476592 .2315544
d87 .1349289 .0813135 1.66 0.097 -.0244427 .2943005
_cons .0235864 .1506683 0.16 0.876 -.271718 .3188907

sigma_u .32460315
sigma_e .35099001
rho .46100216 (fraction of variance due to u_i)
28
• Output:
– Note that corr(u_i, X) = 0 (assumed)
In the FE model, Stata estimated this correlation.
– The key estimates are:  (theta) = 0.643
σ (sigma_u) = 0.325
σe (sigma_e) = 0.35

• Interpretation:
Interpret the coefficients as you would in an OLS model:
– Return to an additional year of education is 9.2%, c.p.
– On average, those who are married earn 100(𝑒 0.064 −
1) = 6.61% more than not married, and union
100 𝑒 0.106 − 1 = 11.2% more than non-union, c.p.
– How do these estimates compare to FE and POLS?

29
Variable OLS RE FE

educ 0.091*** 0.092*** POLS and FE


black -0.139*** -0.139**
hisp 0.016 0.022 results are
exper 0.067*** 0.106*** repeated from
expersq -0.002** -0.005*** -0.005*** earlier slides
married 0.108*** 0.064*** 0.047*
union 0.182*** 0.106*** 0.080***

legend: * p<0.05; ** p<0.01; *** p<0.001

• educ, black and hisp: similar effects for pooled OLS and
RE.
• married and union: smaller effects for RE than OLS
– RE eliminates (part of) individual unobserved effect
– Smaller still when we eliminate the entire effect using FE
• For estimates on time-varying variables:
– RE will be closer to FE when  is close to 1, and closer
to pooled OLS when  is close to 0.
– Here,  = 0.643.
30
6.6 Conclusion
• Random effects uses a transformation to eliminate
autocorrelation
– But does not completely eliminate i
• RE has a key advantage over FE:
– Can estimate effect of time-invariant factors
• But RE (and POLS) will produce biased and inconsistent
results if cov(i , Xit) ≠ 0

• How do we choose (statistically) among these models?

• See next set of slides!

Now try class exercise Q2 (or wait for class) 31


MODEL SELECTION

Panel Data Part 7


7.1 Goodness of fit
• We can assess goodness of fit in FE or RE models using
R2, with respect to three equations:
– R2 overall, from yˆ it = βˆ10 + X it βˆ
using avg. variation
– R2 between, from yˆ i = βˆ 01 + X i βˆ between individuals

(
– R2 within, from yˆ it − yˆ i = X it − X i βˆ ) using time variation
within individuals

• Comparisons:
– Can compare POLS and FE using R2
– Typically cannot compare RE and FE using R2:
• Treat the i’s differently.
– In general: estimates of β are more important than R2.

33
• FE model: use R2 within to conduct an F-test for the model,
as usual (i.e. H0: Xit are jointly insignificant).
• RE model: only the asymptotic properties of the estimators
are known, so we use a chi-squared test.
arried union d81 d82 d83 d84 d85 d86 d87, fe
• For our two models:
regression Number of obs = 4360
– FE: Number of groups = 545

Obs per group: min = 8


avg = 8.0
max = 8

F(10,3805) = 83.85
k
2 hisp exper expersq married union
Prob > F d81 d82 d83
= d84 d85
0.0000

ession
f. Std. Err. t Number of obs
P>|t| = Interval]
[95% Conf. 4360
– RE: Number of groups = 545
55 .0007044 -7.36 0.000 -.0065666 -.0038044
04 .0183104 2.55 Obs
0.011per group: min
.0107811 = 8
.0825796
19 .0193103 4.14 0.000 avg = .1178614
.0421423 8.0
12 .0219489 6.89 0.000 max =
.1081584 8
.194224
09 .0244185 10.36 0.000 .2050963 .3008454
ussian
37 .0292419 12.12 Wald
0.000 chi2(14)
.2971125 = 957.77
.4117749
(assumed)
48 .0362266 13.53 Prob > chi2
0.000 .4190894 = .5611402
0.0000
4291089
23 .0452435 13.65 0.000 .5287784 .7061861
66 – Both sets of explanatory variables are jointly significant.
.0561277 13.64 0.000 .6554532 .8755399 34
49 .0687731 13.45 0.000 .7901893 1.059861
7.2 Random effects or fixed effects?
• Recall that, with panel data, there are two types of variation:
– within variation (variation from observation to
observation, within a single individual)
– between variation (variation in observations from
individual to individual)
• FE uses the first type only:
– β is referred to as the within estimator.
• OLS conducted on averages over time of all variables:
– produces the between estimator of β.
• Pooled OLS:
– produces unweighted average of these two estimators.
• RE uses both types of variation.
– The random effects estimator is a matrix-weighted
average of the within and between estimators.
35
There are three implications:
1. This is why RE is more efficient than FE
– it uses both types of variation.

2. This is how RE can produce estimates of coefficients on


time-invariant variables:
– these variables vary between individuals, although not
within an individual over time.

3. This is why the RE estimator is biased when i is correlated


with Xit:
– the between estimator is biased.
– The between estimator attributes all of the differences in
y i to the differences in X i , when some should be due to
i.
36
• To choose between FE and RE, we must decide whether
i is likely to be correlated with Xit :
– If not correlated, RE is appropriate and will give
consistent estimates.
• RE will also be more efficient than FE (for large N
and small T).
– If correlated, FE must be used.
• If RE is used, we incur a heterogeneity bias
(estimates will be biased and inconsistent).

• Two methods of choosing:


– Economic knowledge / intuition
– Statistical tests

37
(a) Economic knowledge/intuition
• Consider our sample of employed individuals
• Their education levels don’t change over time:
– Cannot include education in a FE wage model, but
– Can include education in a RE wage model.
• But in RE we assume that education is uncorrelated with i:
– Recall that i includes all unmeasured time-invariant
factors (e.g. ability, family background, etc.)
• If this assumption doesn’t hold:
– Biased and inconsistent estimate of effect of education
• Often, the key reason for using panel data is to allow
(control) for i being correlated with the explanatory
variables
– i.e. RE is not justifiable in such cases
38
(b) Testing for random effects
• Recall that if  = 0, we should just estimate the model by
pooled OLS.
– This occurs if all individual effects are equal
– i.e. there is no variation in i
• We can test this using the Breusch and Pagan (1980)
Lagrange multiplier test:
H0: σ2 = 0 (use POLS or FE)
H1: σ2 ≠ 0 (use RE or FE)
• The test statistic follows a chi-squared distribution, with
df = 1.

39
• This is a post-estimation test:
– i.e. first estimate xtreg model
. xttest0

Breusch and Pagan Lagrangian multiplier test for random effects

lwage[nr,t] = Xb + u[nr] + e[nr,t]

Estimated results:
Var sd = sqrt(Var)

lwage .2836728 .5326094


e .123194 .35099
u .1053672 .3246031

Test: Var(u) = 0
chi2(1) = 3203.64
Prob > chi2 = 0.0000

• We must reject H0 at all significance levels:


– There is variation in the unobserved individual effects, i,
– It would not be appropriate to estimate this model by
pooled OLS.
40
(c) Hausman test for comparing FE & RE
• Compare FE and RE estimates as a test of cov(i , Xit) = 0
– Developed by Hausman in 1978.
• Provided that the model is correctly specified:
– If there’s no correlation, the coefficients estimated by both
methods should not differ systematically.
• H0: no systematic difference in estimates
– This implies that cov(i , Xit) = 0
– If H0 holds: both models are consistent, but RE is more
efficient.
• H1: estimates differ systematically
– This implies that cov(i , Xit) ≠ 0
– If H1 holds: FE is better than RE (which is biased and
inconsistent).
41
. hausman FE RE

Coefficients
(b) (B) (b-B) sqrt(diag(V_b-V_B))
FE RE Difference S.E.

expersq -.0051855 -.0047239 -.0004616 .0001443


married .0466804 .063986 -.0173057 .0073414
union .0800019 .1061344 -.0261326 .0073572
d81 .1511912 .040462 .1107292 .
d82 .2529709 .0309212 .2220497 .
d83 .3544437 .0202806 .3341631 .
d84 .4901148 .0431187 .4469961 .
d85 .6174823 .0578155 .5596668 .
d86 .7654966 .0919476 .673549 .
d87 .9250249 .1349289 .790096 .

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(10) = (b-B)'[(V_b-V_B)^(-1)](b-B)
= 26.36
Prob>chi2 = 0.0033
(V_b-V_B is not positive definite)
• At all significance levels above 0.33%, we must reject H0.
• Therefore there is significant correlation between i and Xit
– Model should be estimated by FE.
– Not surprising that unobserved heterogeneity is correlated
with the observed variables in a wage equation. 42
7.3 Selection of a static panel model
Is there a Random Effect?
B-P LM test (H0: σ2 = 0)
No Yes
No POLS -- (RE)
Is there a Fixed Effect?
F-test (H0: all i = 0) FE or RE:
Yes FE
Do a Hausman test
Is cov(i , Xit) = 0?

Do not
Reject H0
reject H0

Use FE Use RE
43
Limitations
• When choosing POLS:
– contemporaneous exogeneity must hold
• When choosing FE or RE:
– strict exogeneity must hold

• All models estimated here are static:


– They don’t include a lag of the dependent variable
• But many economic models are dynamic
• Dynamic panel methods:
– Growing area of econometric analysis
– But: including 𝑦𝑖𝑡−1 introduces statistical complications
– Beyond the scope of this course
44
7.4 Further panel estimation techniques
• These sessions have merely introduced panel estimation
– A wide variety of further techniques can be explored
• When T > N, time series-type methods may be required
– Testing for autocorrelation:
xtserial (download the command)
– Allowing for autocorrelation in panel data models:
• FE and RE models with AR(1) error term
xtregar
– Testing for stationarity in panel datasets
xtunitroot
– See Stata help menu for more details on these methods.

45
7.5 Conclusion
• Panel data methods are widely used in many research
fields:
– They expand the range of questions we can answer
– Allow for better causal analysis
• We’ve introduced the key methods for static panel
analysis:
– Pooling of multiple cross sections
– Fixed effects estimation
– Random effects estimation

• The pracs and exercises will help you to learn to apply


these methods to real-world data.

Now try class exercise Q3 (or wait for class) 46

You might also like