1

Chapter 4: Test Hypotheses with Panel Data

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Chapter 4: Test Hypotheses with Panel Data

Chapter 4: Test Hypotheses with Panel Data

[email protected] http://www.mysmu.edu/faculty/zlyang/ Zhenlin Yang

Tests for poolability -- F-tests

Tests for fixed effects -- F-tests

Tests for random effects• LR tests for random effects • Wald tests for random effects• LM tests for random effects

Hausman’s tests of Random Effects vs Fixed Effects • Hausman’s test for the one-way model • Hausman’s test for the two-way model

This chapter introduces statistical tests of important hypotheses for the panel data models. Main tests include:

Page 2: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4

This model assumes that 𝛽𝛽 is constant over i and t, i.e., data from different cross-sectional units and time periods can be pooled together to give a model with the same slope vector 𝛽𝛽.

Can this be done? Does 𝛽𝛽 change over i or t?

This boils down to tests whether the model

𝑦𝑦𝑖𝑖𝑖𝑖 = 𝛼𝛼 + 𝑋𝑋𝑖𝑖𝑖𝑖′ 𝛽𝛽𝑖𝑖 + 𝑢𝑢𝑖𝑖𝑖𝑖 or 𝑦𝑦𝑖𝑖𝑖𝑖 = 𝛼𝛼 + 𝑋𝑋𝑖𝑖𝑖𝑖′ 𝛽𝛽𝑖𝑖 + 𝑢𝑢𝑖𝑖𝑖𝑖,

with 𝑢𝑢𝑖𝑖𝑖𝑖 = 𝜇𝜇𝑖𝑖 + 𝜆𝜆𝑖𝑖 + 𝑣𝑣𝑖𝑖𝑖𝑖, is more appropriate.

This type of tests relates to the general issue of structural stability.

4.1. Tests for Poolability

2

Consider the two-way fixed effects model studied in Ch. 3:

𝑦𝑦𝑖𝑖𝑖𝑖 = 𝛼𝛼 + 𝑋𝑋𝑖𝑖𝑖𝑖′ 𝛽𝛽 + 𝑢𝑢𝑖𝑖𝑖𝑖, 𝑢𝑢𝑖𝑖𝑖𝑖 = 𝜇𝜇𝑖𝑖 + 𝜆𝜆𝑖𝑖 + 𝑣𝑣𝑖𝑖𝑖𝑖,

i = 1, …, N, t = 1, …, T, where ∑𝑖𝑖=1𝑁𝑁 𝜇𝜇𝑖𝑖 = 0 and ∑𝑖𝑖=1𝑇𝑇 𝜆𝜆𝑖𝑖 = 0.

Page 3: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4

3

4.1. Tests for Poolability

If 𝒗𝒗𝒊𝒊𝒊𝒊 are iid 𝑵𝑵(𝟎𝟎,𝝈𝝈𝒗𝒗𝟐𝟐), a general F-test for testing a model reduction in a multiple linear regression model is as follows:

𝐹𝐹 =(RRSS − URSS)/(𝑑𝑑𝑅𝑅 − 𝑑𝑑𝑈𝑈)

URSS/𝑑𝑑𝑈𝑈𝐻𝐻0~ 𝐹𝐹𝑑𝑑𝑅𝑅−𝑑𝑑𝑈𝑈, 𝑑𝑑𝑈𝑈 ,

where RRSS and URSS are the residual sum of squares (RSS) for the Restricted and Unrestricted models with dfs 𝑑𝑑𝑅𝑅 and 𝑑𝑑𝑈𝑈.

To test the cross-section (CS) stability under the two-way FE specification 𝑢𝑢𝑖𝑖𝑖𝑖 = 𝜇𝜇𝑖𝑖 + 𝜆𝜆𝑖𝑖 + 𝑣𝑣𝑖𝑖𝑖𝑖, i.e., to test

𝐻𝐻0: 𝑦𝑦𝑖𝑖𝑖𝑖 = 𝛼𝛼 + 𝑋𝑋𝑖𝑖𝑖𝑖′ 𝛽𝛽 + 𝑢𝑢𝑖𝑖𝑖𝑖 vs 𝐻𝐻𝑎𝑎: 𝑦𝑦𝑖𝑖𝑖𝑖 = 𝛼𝛼 + 𝑋𝑋𝑖𝑖𝑖𝑖′ 𝛽𝛽𝑖𝑖 + 𝑢𝑢𝑖𝑖𝑖𝑖,

We have, 𝐹𝐹𝐶𝐶𝐶𝐶 = (RRSS−URSS)/( (𝑁𝑁−1)𝐾𝐾)URSS/(𝑁𝑁𝑇𝑇−𝑁𝑁𝐾𝐾−𝑁𝑁−𝑇𝑇+1)

𝐻𝐻0~ 𝐹𝐹𝑑𝑑𝑅𝑅−𝑑𝑑𝑈𝑈, 𝑑𝑑𝑈𝑈 ,

where 𝑑𝑑𝑈𝑈 = 𝑁𝑁𝑁𝑁 − 𝑁𝑁𝑁𝑁 − 𝑁𝑁 − 𝑁𝑁 + 1 and 𝑑𝑑𝑅𝑅 = 𝑁𝑁𝑁𝑁 − 𝑁𝑁 − 𝑁𝑁 − 𝑁𝑁 + 1.

Page 4: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4

4

4.1. Tests for Poolability

To test the time-series (TS) stability under the two-way FE specification 𝑢𝑢𝑖𝑖𝑖𝑖 = 𝜇𝜇𝑖𝑖 + 𝜆𝜆𝑖𝑖 + 𝑣𝑣𝑖𝑖𝑖𝑖, , i.e., to test

𝐻𝐻0: 𝑦𝑦𝑖𝑖𝑖𝑖 = 𝛼𝛼 + 𝑋𝑋𝑖𝑖𝑖𝑖′ 𝛽𝛽 + 𝑢𝑢𝑖𝑖𝑖𝑖 vs 𝐻𝐻𝑎𝑎: 𝑦𝑦𝑖𝑖𝑖𝑖 = 𝛼𝛼 + 𝑋𝑋𝑖𝑖𝑖𝑖′ 𝛽𝛽𝑖𝑖 + 𝑢𝑢𝑖𝑖𝑖𝑖,

We have, 𝐹𝐹𝑇𝑇𝐶𝐶 = (RRSS−URSS)/( (𝑇𝑇−1)𝐾𝐾)URSS/(𝑁𝑁𝑇𝑇−𝐾𝐾𝑇𝑇−𝑁𝑁−𝑇𝑇+1)

𝐻𝐻0~ 𝐹𝐹𝑑𝑑𝑅𝑅−𝑑𝑑𝑈𝑈, 𝑑𝑑𝑈𝑈 ,

where 𝑑𝑑𝑈𝑈 = 𝑁𝑁𝑁𝑁 − 𝑁𝑁𝑁𝑁 − 𝑁𝑁 − 𝑁𝑁 + 1 and 𝑑𝑑𝑅𝑅 = 𝑁𝑁𝑁𝑁 − 𝑁𝑁 − 𝑁𝑁 − 𝑁𝑁 + 1.

• Similar F-tests can be carried out under one-way FE specifications: 𝑢𝑢𝑖𝑖𝑖𝑖 = 𝜇𝜇𝑖𝑖 + 𝑣𝑣𝑖𝑖𝑖𝑖 or 𝑢𝑢𝑖𝑖𝑖𝑖 = 𝜆𝜆𝑖𝑖 + 𝑣𝑣𝑖𝑖𝑖𝑖.

• If the poolability hypothesis is not rejected, then one may proceed to fit the one-way FE model as discussed in Ch. 2, or the two-way FE model as discussed in Ch. 3;

• or further test the existence of one-way FE, or the existence of two-way FE, as will be discussed below.

Page 5: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 44.2. Test for Fixed Effects

5

Consider the two-way fixed effects model studied in Ch. 3:

𝑦𝑦𝑖𝑖𝑖𝑖 = 𝛼𝛼 + 𝑋𝑋𝑖𝑖𝑖𝑖′ 𝛽𝛽 + 𝜇𝜇𝑖𝑖 + 𝜆𝜆𝑖𝑖 + 𝑣𝑣𝑖𝑖𝑖𝑖,

i = 1, …, N, t = 1, …, T, where ∑𝑖𝑖=1𝑁𝑁 𝜇𝜇𝑖𝑖 = 0 and ∑𝑖𝑖=1𝑇𝑇 𝜆𝜆𝑖𝑖 = 0.

The following hypotheses are of interest:Joint test, 𝐻𝐻0: 𝜇𝜇1 = ⋯ = 𝜇𝜇𝑁𝑁 and 𝜆𝜆1 = ⋯ = 𝜆𝜆𝑇𝑇Conditional test, 𝐻𝐻0: 𝜇𝜇1 = ⋯ = 𝜇𝜇𝑁𝑁, given 𝜆𝜆1 = ⋯ = 𝜆𝜆𝑇𝑇;Conditional test, 𝐻𝐻0: 𝜆𝜆1 = ⋯ = 𝜆𝜆𝑇𝑇, given 𝜇𝜇1 = ⋯ = 𝜇𝜇𝑁𝑁;Marginal test, 𝐻𝐻0: 𝜇𝜇1 = ⋯ = 𝜇𝜇𝑁𝑁, allowing 𝜆𝜆𝑖𝑖′ 𝑠𝑠 to differ;Marginal test, 𝐻𝐻0: 𝜆𝜆1 = ⋯ = 𝜆𝜆𝑇𝑇, allowing 𝜇𝜇𝑖𝑖′𝑠𝑠 to differ.

If 𝒗𝒗𝒊𝒊𝒊𝒊 are iid N(𝟎𝟎,𝝈𝝈𝒗𝒗𝟐𝟐), then the general F-test given above can be used for testing each of the above hypotheses.

Page 6: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4

6

Joint Test for Fixed Effects

A test of the joint significance of the individual and time fixed effects, i.e., a joint test of the hypothesis is of interest:

𝐻𝐻0: 𝜇𝜇1 = ⋯ = 𝜇𝜇𝑁𝑁 and 𝜆𝜆1 = ⋯ = 𝜆𝜆𝑇𝑇.

If 𝑣𝑣𝑖𝑖𝑖𝑖 are iid N(0,𝜎𝜎𝑣𝑣2), an F test was given in Ch. 3 as follow:

𝐹𝐹𝐽𝐽 =(RRSS − URSS)/(𝑁𝑁 + 𝑁𝑁 − 2)

URSS/((N − 1)(T −1) − 𝑁𝑁)𝐻𝐻0~ 𝐹𝐹𝑁𝑁+𝑇𝑇−2, (𝑁𝑁−1) 𝑇𝑇−1 −𝐾𝐾

RRSS: the restricted residual sum of squares from fitting the null model, with NT−(K+1) degrees of freedom (df).

URSS: the unrestricted residual sum of squares from fitting Model (3.2), with df = (N−1)(T−1)−K.

Stata does not have direct commands for two-way FE analysis or test, but it can be done by extending the existing procedures.

Page 7: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4

7

First, we are interested in a conditional test of the hypothesis:

𝐻𝐻0: 𝜇𝜇1 = ⋯ = 𝜇𝜇𝑁𝑁, given 𝜆𝜆1 = ⋯ = 𝜆𝜆𝑇𝑇.

If 𝑣𝑣𝑖𝑖𝑖𝑖 are iid N(0,𝜎𝜎𝑣𝑣2), an F test was given in Ch. 2 as follow:

𝐹𝐹C1 =(RRSS − URSS)/(𝑁𝑁 − 1)

URSS/(𝑁𝑁𝑁𝑁 − 𝑁𝑁 − 𝑁𝑁)𝐻𝐻0~ 𝐹𝐹𝑁𝑁−1, 𝑁𝑁 𝑇𝑇−1 −𝐾𝐾

where RRSS is the restricted residual sum of squares from fitting the null model with df = NT−(K+1);

URSS is the unrestricted residual sum of squares from fitting Model (2.2) by LSDV or within method with df = N(T−1)−K.

Conditional Test for Individual FE

Note: (i) for joint and conditional tests, the null model is simply a multiple linear regression model; (ii) the sum to zero constraints for the fixed effects can be replaced by letting 𝜇𝜇𝑁𝑁 = 0 and 𝜆𝜆𝑇𝑇 = 0, so that the hypothesis can be, e.g., for joint test , 𝐻𝐻0: 𝜇𝜇1 = ⋯ = 𝜇𝜇𝑁𝑁−1 = 0 and 𝜆𝜆1 = ⋯ = 𝜆𝜆𝑇𝑇−1 = 0.

Page 8: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4Conditional Tests for Time FE

8

Similarly, we have another conditional test of the hypothesis:

𝐻𝐻0: 𝜆𝜆1 = ⋯ = 𝜆𝜆𝑇𝑇, given 𝜇𝜇1 = ⋯ = 𝜇𝜇𝑁𝑁.

Paralleled with the development of the 𝐹𝐹C1 test, an F test for testing the lack of time FE, given that there is no individual FE, is given as follow:

𝐹𝐹C2 =(RRSS − URSS)/(𝑁𝑁 − 1)

URSS/(𝑁𝑁𝑁𝑁 − 𝑁𝑁 − 𝑁𝑁)𝐻𝐻0~ 𝐹𝐹𝑇𝑇−1, 𝑁𝑁−1 𝑇𝑇−𝐾𝐾

where RRSS is the restricted residual sum of squares from fitting the null model with df = NT−(K+1);

URSS is the unrestricted residual sum of squares from fitting a model with time FE only with df = (N−1)T−K.

Page 9: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4

9

Chap 3 also introduced a marginal test for the non-existence of individual FE, allowing for the existence of time FE:

𝐻𝐻0: 𝜇𝜇1 = ⋯ = 𝜇𝜇𝑁𝑁 allowing 𝜆𝜆𝑖𝑖 ≠ 𝜆𝜆𝑠𝑠, 𝑡𝑡 ≠ 𝑠𝑠 = 1, . . . ,𝑁𝑁.

Under the null, one fits the model: 𝑦𝑦𝑖𝑖𝑖𝑖 = 𝛼𝛼 + 𝑋𝑋𝑖𝑖𝑖𝑖′ 𝛽𝛽 + 𝜆𝜆𝑖𝑖 + 𝑣𝑣𝑖𝑖𝑖𝑖 by LSDV; otherwise, fits Model (3.2) by Within estimation.

Under Assumption A and normality of 𝑣𝑣𝑖𝑖𝑖𝑖, an F test is

𝐹𝐹M1 =(RRSS − URSS)/(𝑁𝑁 − 1)

URSS/((N − 1)(T −1) − 𝑁𝑁)𝐻𝐻0~ 𝐹𝐹𝑁𝑁−1, (𝑁𝑁−1) 𝑇𝑇−1 −𝐾𝐾

RRSS: the restricted residual sum of squares from fitting the null model, with df = NT−T−K.

URSS: the unrestricted residual sum of squares from fitting Model (3.2), with df = (N−1)(T−1)−K.

Marginal Test for Individual FE

Page 10: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4Marginal Test for Time FE

10

Paralleled with the above, a marginal test for the non-existence of time FE, allowing for the existence of individual FE:

𝐻𝐻0: 𝜆𝜆1 = ⋯ = 𝜆𝜆𝑇𝑇 allowing 𝜇𝜇𝑖𝑖 ≠ 𝜇𝜇𝑗𝑗 , 𝑖𝑖 ≠ 𝑗𝑗 = 1, . . . ,𝑁𝑁,

is of interest. Under 𝐻𝐻0, one fits the model: 𝑦𝑦𝑖𝑖𝑖𝑖 = 𝛼𝛼 + 𝑋𝑋𝑖𝑖𝑖𝑖′ 𝛽𝛽 +𝜇𝜇𝑖𝑖 + 𝑣𝑣𝑖𝑖𝑖𝑖 by LSDV; otherwise, Model (3.2) by Within estimator.

Under Assumption A and normality of 𝑣𝑣𝑖𝑖𝑖𝑖, an F test is

𝐹𝐹M2 =(RRSS − URSS)/(𝑁𝑁 − 1)

URSS/((N − 1)(T −1) − 𝑁𝑁)𝐻𝐻0~ 𝐹𝐹𝑇𝑇−1, 𝑁𝑁−1 (𝑇𝑇−1)−𝐾𝐾

RRSS: the restricted residual sum of squares from fitting the null model, with df = NT−N− K.

URSS: the unrestricted residual sum of squares from fitting Model (3.2), with df = (N−1)(T−1) −K.

Page 11: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4Test for Fixed Effects: Stata FC1 -Test

11

Table 4.1. Public Capital Productivity: One-way Individual FE.. xtset state0. xtreg ln_gsp ln_pcap ln_pc ln_emp unemp, fe

Fixed-effects (within) regression Number of obs = 816Group variable: state0 Number of groups = 48

R-sq: Obs per group:within = 0.9413 min = 17between = 0.9921 avg = 17.0overall = 0.9910 max = 17

F(4,764) = 3064.81corr(u_i, Xb) = 0.0608 Prob > F = 0.0000------------------------------------------------------------------------------

ln_gsp | Coef. Std. Err. t P>|t| [95% Conf. Interval]-------------+----------------------------------------------------------------

ln_pcap | -.0261493 .0290016 -0.90 0.368 -.0830815 .0307829ln_pc | .2920067 .0251197 11.62 0.000 .2426949 .3413185ln_emp | .7681595 .0300917 25.53 0.000 .7090872 .8272318unemp | -.0052977 .0009887 -5.36 0.000 -.0072387 -.0033568_cons | 2.352898 .1748131 13.46 0.000 2.009727 2.696069

-------------+----------------------------------------------------------------sigma_u | .09057293 gives the standard deviation of individual effects 𝜇𝜇𝑖𝑖sigma_e | .03813705 gives the standard deviation of idiosyncratic error 𝑣𝑣𝑖𝑖𝑖𝑖

rho | .8494045 (fraction of variance due to u_i)------------------------------------------------------------------------------F test that all u_i=0: F(47, 764) = 75.82 Prob > F = 0.0000

Page 12: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4Test for Fixed Effects: Stata FC2 -Test

12

Table 4.2. Public Capital Productivity: One-way Time FE.. xtset yr. xtreg ln_gsp ln_pcap ln_pc ln_emp unemp, fe

Fixed-effects (within) regression Number of obs = 816Group variable: yr Number of groups = 17

R-sq: Obs per group:within = 0.9927 min = 48between = 0.9867 avg = 48.0overall = 0.9926 max = 48

F(4,795) = 27156.04corr(u_i, Xb) = 0.0472 Prob > F = 0.0000------------------------------------------------------------------------------

ln_gsp | Coef. Std. Err. t P>|t| [95% Conf. Interval]-------------+----------------------------------------------------------------

ln_pcap | .16478 .0174912 9.42 0.000 .1304456 .1991144ln_pc | .3035959 .0104427 29.07 0.000 .2830975 .3240944ln_emp | .5888107 .0137757 42.74 0.000 .5617697 .6158517unemp | -.0060575 .0017702 -3.42 0.001 -.0095322 -.0025827_cons | 1.639079 .0573369 28.59 0.000 1.526529 1.751629

-------------+----------------------------------------------------------------sigma_u | .01755703sigma_e | .08732832

rho | .03884931 (fraction of variance due to u_i)------------------------------------------------------------------------------F test that all u_i=0: F(16, 795) = 1.90 Prob > F = 0.0179

Page 13: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4Test for Fixed Effects: Stata FM1 -Test

13

Table 4.3. Public Capital Productivity: Individual FE, Time Dummies.. xtreg ln_gsp ln_pcap ln_pc ln_emp unemp i.yr, fe

Fixed-effects (within) regression Number of obs = 816Group variable: state0 Number of groups = 48

R-sq: Obs per group:within = 0.9536 min = 17between = 0.9890 avg = 17.0overall = 0.9879 max = 17

F(20,748) = 768.12corr(u_i, Xb) = 0.7201 Prob > F = 0.0000------------------------------------------------------------------------------

ln_gsp | Coef. Std. Err. t P>|t| [95% Conf. Interval]-------------+----------------------------------------------------------------Covariates …Time Dummies …

-------------+----------------------------------------------------------------sigma_u | .15633758sigma_e | .0342888

rho | .95410413 (fraction of variance due to u_i)------------------------------------------------------------------------------F test that all u_i=0: F(47, 748) = 93.80 Prob > F = 0.0000

Page 14: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4Test for Fixed Effects: Stata FM2-Test

14

Table 4.4. Public Capital Productivity: Time FE, Individual Dummies.. xtreg ln_gsp ln_pcap ln_pc ln_emp unemp i.state0, fe

Fixed-effects (within) regression Number of obs = 816Group variable: yr Number of groups = 17

R-sq: Obs per group:within = 0.9989 min = 48between = 0.9875 avg = 48.0overall = 0.9983 max = 48

F(51,748) = 13901.80corr(u_i, Xb) = 0.0916 Prob > F = 0.0000------------------------------------------------------------------------------

ln_gsp | Coef. Std. Err. t P>|t| [95% Conf. Interval]-------------+----------------------------------------------------------------Covariates …

Individual Dummies …-------------+----------------------------------------------------------------

sigma_u | .02683471sigma_e | .0342888

rho | .37983587 (fraction of variance due to u_i)------------------------------------------------------------------------------F test that all u_i=0: F(16, 748) = 12.32 Prob > F = 0.0000

Page 15: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 44.3. Tests for Random Effects

15

A joint test of no individual and time random effects is to test𝐻𝐻0: 𝜎𝜎𝜇𝜇2 = 𝜎𝜎𝜆𝜆

2 = 0.A conditional test for individual RE, given no time RE, is to test

𝐻𝐻0: 𝜎𝜎𝜇𝜇2 = 0, given 𝜎𝜎𝜆𝜆2 = 0.

A conditional test for time RE, given no individual RE, is to test𝐻𝐻0:𝜎𝜎𝜆𝜆

2 = 0, given 𝜎𝜎𝜇𝜇2 = 0. A marginal test for individual RE, allowing time RE, is to test

𝐻𝐻0: 𝜎𝜎𝜇𝜇2 = 0, allowing 𝜎𝜎𝜆𝜆2 > 0.

A marginal test for time RE, allowing individual RE, is to test𝐻𝐻0: 𝜎𝜎𝜆𝜆

2 = 0, allowing 𝜎𝜎𝜇𝜇2 > 0.

Consider the two-way random effects model given Ch. 3:

𝑦𝑦𝑖𝑖𝑖𝑖 = 𝛼𝛼 + 𝑋𝑋𝑖𝑖𝑖𝑖′ 𝛽𝛽 + 𝜇𝜇𝑖𝑖 + 𝜆𝜆𝑖𝑖 + 𝑣𝑣𝑖𝑖𝑖𝑖,

i = 1, …, N and t = 1, …, T.

Page 16: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4LR Tests for Random Effects

16

A general test for testing the above hypotheses is the likelihood ratio (LR) test, which reads as: “the negative twice the difference between the maximized loglikelihood of the restricted model and that of the unrestricted model”, i.e.,

𝐿𝐿𝐿𝐿 = −2(�ℓ𝑅𝑅 − �ℓ𝑈𝑈),where �ℓ𝑅𝑅 is the maximum of the loglikelihood of the restricted model, and �ℓ𝑈𝑈 is that of the unrestricted model.

• The limiting null distribution of LR is chi-squared,• The df of LR test = no. of restrictions imposed by 𝐻𝐻0.• See Greene (2012, Sec. 14.6) for details.

Recall Assumption C: (i) 𝜇𝜇𝑖𝑖 ~ IID(0, 𝜎𝜎𝜇𝜇2), 𝜆𝜆𝑖𝑖 ~ IID(0, 𝜎𝜎𝜆𝜆2), and 𝑣𝑣𝑖𝑖𝑖𝑖 ~ IID(0, 𝜎𝜎𝑣𝑣2), independent of each other, and (ii) 𝑋𝑋𝑖𝑖𝑖𝑖 is independent of 𝜇𝜇𝑖𝑖, 𝜆𝜆𝑖𝑖, and 𝑣𝑣𝑖𝑖𝑖𝑖 for all i and t.

Page 17: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4LR Tests for Random Effects -- Stata

17

Table 4.5. Public Capital Productivity: One-way Individual RE.. xtset state0

panel variable: state0 (balanced)

. xtreg ln_gsp ln_pcap ln_pc ln_emp unemp, mle

Fitting constant-only model:…Iteration 2: log likelihood = 195.45155

Fitting full model:Iteration 0: log likelihood = 1374.1026…Iteration 4: log likelihood = 1401.9041

Random-effects ML regression Number of obs = 816Group variable: state0 Number of groups = 48

Random effects u_i ~ Gaussian Obs per group:min = 17avg = 17.0max = 17

LR chi2(4) = 2412.91Log likelihood = 1401.9041 Prob > chi2 = 0.0000

Page 18: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4LR Tests for Random Effects -- Stata

18

Table 4.5. Cont’d------------------------------------------------------------------------------

ln_gsp | Coef. Std. Err. z P>|z| [95% Conf. Interval]-------------+----------------------------------------------------------------

ln_pcap | .0031446 .0239185 0.13 0.895 -.0437348 .050024ln_pc | .309811 .020081 15.43 0.000 .270453 .349169

ln_emp | .7313372 .0256936 28.46 0.000 .6809787 .7816957unemp | -.0061382 .0009143 -6.71 0.000 -.0079302 -.0043462_cons | 2.143865 .1376582 15.57 0.000 1.87406 2.413671

-------------+----------------------------------------------------------------/sigma_u | .085162 .0090452 .0691573 .1048706/sigma_e | .0380836 .0009735 .0362226 .0400402

rho | .8333481 .0304597 .7668537 .8861754------------------------------------------------------------------------------LR test of sigma_u=0: chibar2(01) = 1149.84 Prob >= chibar2 = 0.000

The LR statistic, for testing 𝐻𝐻0: 𝜎𝜎𝜇𝜇2 = 0, given 𝜎𝜎𝜆𝜆2 = 0, has a value

of 1149.84, providing highly strong evidence against 𝐻𝐻0.Similarly, the LR test for testing 𝐻𝐻0:𝜎𝜎𝜆𝜆

2 = 0, given 𝜎𝜎𝜇𝜇2 = 0, can be conducted by switching the role of the IDs state0 and yr.

Page 19: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4LR Tests for Random Effects -- Stata

19

Table 4.6. Public Capital Productivity: Two-Way Random Effects. xtset state0 yr

panel variable: state0 (strongly balanced)time variable: yr, 1970 to 1986

delta: 1 unit

. xtmixed ln_gsp ln_pcap ln_pc ln_emp unemp || _all: R.yr || state0:, mle

Performing EM optimization:

Performing gradient-based optimization:

Iteration 0: log likelihood = 1450.8421 Iteration 1: log likelihood = 1450.8421

Computing standard errors:

Mixed-effects ML regression Number of obs = 816-------------------------------------------------------------

| No. of Observations per GroupGroup Variable | Groups Minimum Average Maximum

----------------+--------------------------------------------_all | 1 816 816.0 816

state0 | 48 17 17.0 17-------------------------------------------------------------

Wald chi2(4) = 9105.50Log likelihood = 1450.8421 Prob > chi2 = 0.0000

Page 20: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4LR Tests for Random Effects -- Stata

20

Table 4.6. Cont’d------------------------------------------------------------------------------

ln_gsp | Coef. Std. Err. z P>|z| [95% Conf. Interval]-------------+----------------------------------------------------------------

ln_pcap | .0202634 .0235846 0.86 0.390 -.0259617 .0664884ln_pc | .2498939 .0219219 11.40 0.000 .2069279 .29286

ln_emp | .7497823 .0241874 31.00 0.000 .7023758 .7971888unemp | -.0043719 .0010576 -4.13 0.000 -.0064447 -.002299_cons | 2.470481 .1461092 16.91 0.000 2.184112 2.756849

------------------------------------------------------------------------------------------------------------------------------------------------------------Random-effects Parameters | Estimate Std. Err. [95% Conf. Interval]

-----------------------------+------------------------------------------------_all: Identity |

sd(R.yr) | .0165187 .003275 .0112 .0243632-----------------------------+------------------------------------------------state0: Identity |

sd(_cons) | .0909035 .0102736 .0728418 .1134436-----------------------------+------------------------------------------------

sd(Residual) | .0346826 .0009032 .0329567 .0364989------------------------------------------------------------------------------LR test vs. linear model: chi2(2) = 1247.72 Prob > chi2 = 0.0000Note: LR test is conservative and provided only for reference.

Page 21: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4LR Tests for Random Effects -- Stata

21

Public Capital Productivity Data: Two-Way Random Effects, Cont’d

From Table 4.6, the LR statistic, for testing 𝐻𝐻0: 𝜎𝜎𝜇𝜇2 = 𝜎𝜎𝜆𝜆2 = 0,

equals 1247.72, providing highly strong evidence against 𝐻𝐻0.

An LR test for testing 𝐻𝐻0:𝜎𝜎𝜆𝜆2 = 0, allowing 𝜎𝜎𝜇𝜇2 > 0, can be

conducted using the output for one-way individual RE and the output for two-way RE.

• From Table 4.6, the output of two-way RE by Stata command xtmixedwith option mle, we obtain Log likelihood = 1450.8421,

• From Table 4.5, the output of one-way individual RE by Stata commands xtreg and mle, we have Log likelihood = 1401.9041,

• Therefore, LR = −2 1401.9041− 1450.8421 = 97.876, with df = 1, highly significant against 𝐻𝐻0.

An LR test for testing 𝐻𝐻0:𝜎𝜎𝜇𝜇2 = 0, allowing 𝜎𝜎𝜆𝜆2 > 0, can be

conducted using the outputs for one-way time RE and two-way RE.

Page 22: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4Wald Tests for Random Effects

22

From Table 4.5, we have �𝜎𝜎𝜇𝜇=.085162 with estimated standard error being .0090452. Therefore, the Wald test for testing 𝐻𝐻0:𝜎𝜎𝜇𝜇 =0, given 𝜎𝜎𝜆𝜆 = 0, has a value W = (.085162/ .0090452)2 = 88.65, a super strong evidence against 𝐻𝐻0.

A Wald test for testing 𝐻𝐻0:𝜎𝜎𝜆𝜆 = 0, given 𝜎𝜎𝜇𝜇 = 0, can be conducted using the outputs for one-way time RE.More tests can be done … .

Second general test for testing the above hypotheses is the Wald test. It has the following general format,

𝑊𝑊 = �𝜃𝜃 − 𝜃𝜃0′ Estimated Var( �𝜃𝜃) −1 �𝜃𝜃 − 𝜃𝜃0 ,

where �𝜃𝜃 and 𝜃𝜃0 are the estimated and hypothesized values of 𝜃𝜃. • under H0, W ~ 𝜒𝜒𝑑𝑑𝑑𝑑2 , with df = dimension of the parameter vector 𝜃𝜃.• See Greene (2012, Sec. 14.6) for details.

Page 23: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4LM Tests for Random Effects

23

Baltagi (2013, Chap. 4) presents several conditional, marginal, and joint LM tests for testing the random effects.

The Stata command: xttest0 (see xt.pdf, pp. 476, STATA16) gives the LM test for a one-way individual random effects.Stata commands for LM tests of two-way random effects ???

The third and perhaps the most popular test may be Lagrange multiplier (LM) test or efficient score test (or simply score test). It has the following general form:

𝐿𝐿𝐿𝐿 = 𝜕𝜕ln𝐿𝐿(�𝜃𝜃𝑅𝑅)𝜕𝜕�𝜃𝜃𝑅𝑅

′I( �𝜃𝜃𝑅𝑅) −1 𝜕𝜕ln𝐿𝐿(�𝜃𝜃𝑅𝑅)

𝜕𝜕�𝜃𝜃𝑅𝑅,

where �𝜃𝜃𝑅𝑅 is the restricted estimate of the parameter vector 𝜃𝜃. • under H0, LM ~ 𝜒𝜒𝑑𝑑𝑑𝑑2 , with df = dimension reduction of 𝜃𝜃.• See Greene (2012, Sec. 14.6) for details.

I(𝜃𝜃): Expected Fisher Information Matrix

Page 24: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4LM Tests for Random Effects

24

The joint and the two conditional tests for random effects:𝐿𝐿𝐿𝐿𝐽𝐽: joint LM test of 𝐻𝐻0: 𝜎𝜎𝜇𝜇2 = 𝜎𝜎𝜆𝜆

2 = 0,𝐿𝐿𝐿𝐿C1: conditional LM test of 𝐻𝐻0: 𝜎𝜎𝜇𝜇2 = 0, given 𝜎𝜎𝜆𝜆

2 = 0, 𝐿𝐿𝐿𝐿C2: conditional LM test of 𝐻𝐻0:𝜎𝜎𝜆𝜆

2 = 0, given 𝜎𝜎𝜇𝜇2 = 0,can be derived together. They all depend only on the OLS residuals of the regression 𝑦𝑦𝑖𝑖𝑖𝑖 = 𝛼𝛼 + 𝑋𝑋𝑖𝑖𝑖𝑖′ 𝛽𝛽 + 𝑢𝑢𝑖𝑖𝑖𝑖, and take the simple forms:

𝐿𝐿𝐿𝐿𝐽𝐽 = 𝑁𝑁𝑇𝑇2(𝑇𝑇−1)

1 − �𝑢𝑢′(𝐼𝐼𝑁𝑁⊗𝐽𝐽𝑇𝑇)�𝑢𝑢�𝑢𝑢′�𝑢𝑢

2+ 𝑁𝑁𝑇𝑇

2(𝑇𝑇−1)1 − �𝑢𝑢′(𝐽𝐽𝑁𝑁⊗𝐼𝐼𝑇𝑇)�𝑢𝑢

�𝑢𝑢′�𝑢𝑢

2

≡ 𝐿𝐿𝐿𝐿C1 ≡ 𝐿𝐿𝐿𝐿C2

where �𝑢𝑢 is the vector of OLS residuals. Their asymptotic null distributions are 𝜒𝜒22, 𝜒𝜒12, and 𝜒𝜒12, respectively.

For details on these tests, see Baltagi (2013, Chap. 4). Calculations of these test statistics can be done using Stata, based on the saved values of �𝑢𝑢. There are alternative LM-type of tests; see , e.g., Baltagi (2013, Chap. 4).

Page 25: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4LM Tests for Random Effects

25

Marginal LM test of 𝐻𝐻0:𝜎𝜎𝜇𝜇2 = 0, allowing 𝜎𝜎𝜆𝜆2 > 0 has the form:

𝐿𝐿𝐿𝐿M1 = 𝑇𝑇�𝜎𝜎22�𝜎𝜎𝑣𝑣2

2 𝑇𝑇−1 [�𝜎𝜎𝑣𝑣4+(𝑁𝑁−1)�𝜎𝜎24]

1�𝜎𝜎22

𝑄𝑄1 − 1 + 𝑁𝑁−1�𝜎𝜎𝑣𝑣2

𝑄𝑄2 − 1 ,

where 𝑄𝑄1 = 1�𝜎𝜎22�𝑢𝑢′( ̅𝐽𝐽𝑁𝑁 ⊗ ̅𝐽𝐽𝑇𝑇) �𝑢𝑢, 𝑄𝑄2 = 1

(𝑁𝑁−1)�𝜎𝜎𝑣𝑣2�𝑢𝑢′(𝐸𝐸𝑁𝑁 ⊗ ̅𝐽𝐽𝑇𝑇) �𝑢𝑢, �𝑢𝑢 is residuals

from GLS on 𝑦𝑦𝑖𝑖𝑖𝑖 = 𝛼𝛼 + 𝑋𝑋𝑖𝑖𝑖𝑖′ 𝛽𝛽 + 𝜆𝜆𝑖𝑖 + 𝑢𝑢𝑖𝑖𝑖𝑖, �𝜎𝜎22 = 1𝑇𝑇�𝑢𝑢′( ̅𝐽𝐽𝑁𝑁 ⊗ 𝐼𝐼𝑇𝑇) �𝑢𝑢, �𝜎𝜎𝑣𝑣2 =

1𝑇𝑇(𝑁𝑁−1)

�𝑢𝑢′ 𝐸𝐸𝑁𝑁 ⊗ 𝐼𝐼𝑇𝑇 �𝑢𝑢, and under 𝐻𝐻0, 𝐿𝐿𝐿𝐿M1~𝜒𝜒12.

Marginal LM test of 𝐻𝐻0:𝜎𝜎𝜆𝜆2 = 0, allowing 𝜎𝜎𝜇𝜇2 > 0 has the form:

𝐿𝐿𝐿𝐿M2 = 𝑁𝑁�𝜎𝜎12�𝜎𝜎𝑣𝑣2

2 𝑁𝑁−1 [�𝜎𝜎𝑣𝑣4+(𝑇𝑇−1)�𝜎𝜎14]

1�𝜎𝜎12

𝐿𝐿1 − 1 + 𝑁𝑁−1�𝜎𝜎𝑣𝑣2

𝐿𝐿2 − 1 ,

where 𝐿𝐿1 = 1�𝜎𝜎12�𝑢𝑢′( ̅𝐽𝐽𝑁𝑁 ⊗ ̅𝐽𝐽𝑇𝑇) �𝑢𝑢, 𝐿𝐿2 = 1

(𝑇𝑇−1)�𝜎𝜎𝑣𝑣2�𝑢𝑢′( ̅𝐽𝐽𝑁𝑁 ⊗ 𝐸𝐸𝑇𝑇) �𝑢𝑢, �𝑢𝑢 is residuals

from GLS on 𝑦𝑦𝑖𝑖𝑖𝑖 = 𝛼𝛼 + 𝑋𝑋𝑖𝑖𝑖𝑖′ 𝛽𝛽 + 𝜇𝜇𝑖𝑖 + 𝑢𝑢𝑖𝑖𝑖𝑖, �𝜎𝜎12 = 1𝑁𝑁�𝑢𝑢′(𝐼𝐼𝑇𝑇 ⊗ ̅𝐽𝐽𝑇𝑇) �𝑢𝑢, �𝜎𝜎𝑣𝑣2 =

1𝑇𝑇(𝑁𝑁−1)

�𝑢𝑢′ 𝐼𝐼𝑁𝑁 ⊗ 𝐸𝐸𝑇𝑇 �𝑢𝑢, and under 𝐻𝐻0, 𝐿𝐿𝐿𝐿M2~𝜒𝜒12.

Page 26: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4LM Tests for Random Effects

26

Table 4.7. Public Capital Productivity: One-Way Random Effects. xtreg ln_gsp ln_pcap ln_pc ln_emp unemp, re

Random-effects GLS regression Number of obs = 816Group variable: state0 Number of groups = 48

R-sq: Obs per group:within = 0.9412 min = 17between = 0.9928 avg = 17.0overall = 0.9917 max = 17

Wald chi2(4) = 19131.09corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000------------------------------------------------------------------------------

ln_gsp | Coef. Std. Err. z P>|z| [95% Conf. Interval]-------------+----------------------------------------------------------------

ln_pcap | .0044388 .0234173 0.19 0.850 -.0414583 .0503359ln_pc | .3105483 .0198047 15.68 0.000 .2717317 .3493649

ln_emp | .7296705 .0249202 29.28 0.000 .6808278 .7785132unemp | -.0061725 .0009073 -6.80 0.000 -.0079507 -.0043942_cons | 2.135411 .1334615 16.00 0.000 1.873831 2.39699

-------------+----------------------------------------------------------------

Page 27: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4LM Tests for Random Effects

27

Table 4.7. Cont’dsigma_u | .0826905sigma_e | .03813705

rho | .82460109 (fraction of variance due to u_i)------------------------------------------------------------------------------

. xttest0

Breusch and Pagan Lagrangian multiplier test for random effects

ln_gsp[state0,t] = Xb + u[state0] + e[state0,t]

Estimated results:| Var sd = sqrt(Var)

---------+-----------------------------ln_gsp | 1.04271 1.021132

e | .0014544 .0381371u | .0068377 .0826905

Test: Var(u) = 0chibar2(01) = 4134.96

Prob > chibar2 = 0.0000

Page 28: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 44.4. Hausman Test for RE vs FE

28

An extensive discussion on fixed effects (FE) vs random effects (RE) was given in Sec. 2.4. In fact, the essential distinction in microeconometric analysis is between FE and RE models.

If the effects are fixed, then the pooled OLS and RE estimators are inconsistent, and the within (or FE) estimator needs to be used;Otherwise, the within estimator is valid but less desirable, because using only within variation leads to less-efficient estimation and inability to estimate effects of time-invariant regressors.Applied researchers therefore face the problem of choosing an appropriate panel data model.

Hausman (1978) developed tests helping researchers to choose between an FE model and an RE Model, referred to as Hausman test in the econometrics literature.

Page 29: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4

Let �̂�𝛽RE be the random effect (GLS) estimator, and �̂�𝛽FE be the fixed effect (within) estimator of 𝛽𝛽.

If 𝐻𝐻0:𝐸𝐸 𝑢𝑢𝑖𝑖𝑖𝑖 𝑋𝑋𝑖𝑖𝑖𝑖 = 0, then both �̂�𝛽RE and �̂�𝛽FE are unbiased and consistent for 𝛽𝛽, but �̂�𝛽RE is more efficient than �̂�𝛽FE.

If, however, 𝐸𝐸 𝑢𝑢𝑖𝑖𝑖𝑖 𝑋𝑋𝑖𝑖𝑖𝑖 ≠ 0 due to 𝐸𝐸 𝜇𝜇𝑖𝑖 𝑋𝑋𝑖𝑖𝑖𝑖 ≠ 0, then only �̂�𝛽FE is unbiased and consistent for 𝛽𝛽 as FE estimation wipes out 𝜇𝜇𝑖𝑖.

Hausman (1978) suggests to compare �̂�𝛽RE and �̂�𝛽FE by using

�𝑞𝑞1 = �̂�𝛽RE − �̂�𝛽FE.

Hausman showed: Var �𝑞𝑞1 = Var(�̂�𝛽FE) − Var �̂�𝛽RE , in general!29

Consider the panel data model with one-way individual effects:𝑦𝑦𝑖𝑖𝑖𝑖 = 𝛼𝛼 + 𝑋𝑋𝑖𝑖𝑖𝑖′ 𝛽𝛽 + 𝑢𝑢𝑖𝑖𝑖𝑖, 𝑢𝑢𝑖𝑖𝑖𝑖 = 𝜇𝜇𝑖𝑖 + 𝑣𝑣𝑖𝑖𝑖𝑖,

i = 1, …, N and t = 1, …, T.

Hausman Test for RE vs FE

Page 30: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4

If �̂�𝛽RE is GLS estimator and �̂�𝛽FE is within estimator of 𝛽𝛽, then,

Var �𝑞𝑞1 = 𝜎𝜎𝑣𝑣2 𝑋𝑋′𝑄𝑄𝑋𝑋 −1 − (𝑋𝑋′Ω−1𝑋𝑋)−1.

Hence, the Hausman test statistic is given by

𝑚𝑚1 = �𝑞𝑞1′ Var �𝑞𝑞1 −1 �𝑞𝑞1

30

Hausman Test for RE vs FE

Hausman test still applies if �̂�𝛽RE and �̂�𝛽FE are from two-way model with the former being the two-way FE estimator and the latter the two-way RE GLS estimator. The variance of the difference

�𝑞𝑞2 = �̂�𝛽RE − �̂�𝛽FE,

again satisfies Var �𝑞𝑞2 = Var(�̂�𝛽FE) − Var �̂�𝛽RE .

Page 31: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4

The Stata command hausman implements the standard form of Hausman test.

The sigmamore option specifies that both covariance matrices are based on the (same) estimated disturbance variance from the efficient estimator.

Suppose we have already stored the within estimator as FE and the RE estimator as RE.

31

Hausman Test -- Stata

Table 4.8. Returns to Schooling Data

. quietly xtreg lwage exp expsq wks, fe

. estimates store FE

. quietly xtreg lwage exp expsq wks, re

. estimates store RE

Consider the “Returns to Schooling Data” introduced in Chap. 3. First, issue the following commands to get and store FE and RE estimates

Page 32: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4

32

Hausman Test -- Stata

Table 4.8. Cont’d. hausman FE RE, sigmamore

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

-------------+----------------------------------------------------------------exp | .1137879 .0919066 .0218813 .0011118

expsq | -.0004244 -.0007519 .0003275 .0000248wks | .0008359 .0008628 -.0000269 .0000936

------------------------------------------------------------------------------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(3) = (b-B)'[(V_b-V_B)^(-1)](b-B)= 1457.90

Prob>chi2 = 0.0000

The overall statistic, chi2(3), has p = 0.000. This leads to strong rejection of the null hypothesis that RE provides consistent estimates.

Page 33: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4

33

Hausman Test -- Stata

Table 4.8. Cont’d. hausman FE RE, sigmaless

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

-------------+----------------------------------------------------------------exp | .1137879 .0919066 .0218813 .0008964

expsq | -.0004244 -.0007519 .0003275 .00002wks | .0008359 .0008628 -.0000269 .0000755

------------------------------------------------------------------------------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(3) = (b-B)'[(V_b-V_B)^(-1)](b-B)= 2242.60

Prob>chi2 = 0.0000

The overall statistic, chi2(3), has p = 0.000. This also leads to strong rejection of the null hypothesis that RE provides consistent estimates.

Page 34: Chapter 4: Test Hypotheses with Panel Data

Chapter 4

ECON6006, Term II 2020-21 © Zhenlin Yang, SMU

Chapter 4

34

Hausman Test -- Stata

sigmamore and sigmaless specify that the two covariance matrices used inthe test be based on a common estimate of disturbance variance(sigma2).

sigmamore specifies that the covariance matrices be based on theestimated disturbance variance from the efficient estimator. Thisoption provides a proper estimate of the contrast variance forso-called tests of exogeneity and overidentification ininstrumental-variables regression.

sigmaless specifies that the covariance matrices be based on theestimated disturbance variance from the consistent estimator.

These options can be specified only when both estimators store e(sigma)or e(rmse), or with the xtreg command. e(sigma_e) is stored after thextreg command with the fe or mle option. e(rmse) is stored after thextreg command with the re option.

sigmamore or sigmaless are recommended when comparing fixed-effects andrandom-effects linear regression because they are much less likely toproduce a non-positive-definite-differenced covariance matrix (althoughthe tests are asymptotically equivalent whether or not one of theoptions is specified).