Hello,
I have a data set that looks at the association between land inequality and counts of violence over six years (2000-2005) and for 798 municipalities. The unit of analysis is the municipality-year. I am using xtreg in Stata 13.1, and deciding whether to report the results of a fixed effects or a random effects model. The Hausman test suggests that I report the fixed effects model. However, there are several variables that are time invariant in the fixed effects model, but for which I would still like to report results (variables that are historical measures of violence from the 1970s). What are the implications if I report the results of the random effects model?
I have a second question- I get an error message in Stata as follows: “the rank of the differenced variance matrix (4) does not equal the number of coefficients being tested (5)…” Does anyone have any ideas on why I would get such an error message? The output is below. Thank you in advance,
Gabriel Nelson
PhD Sociology
xtreg Ginitierra gueract_1 paract_1 coca lpop rainfall temperature totplots60_00 displaced totviolencia85 anucraids1971_78, re
Random-effects GLS regression Number of obs = 3588
Group variable: origmun Number of groups = 798
R-sq: within = 0.0082 Obs per group: min = 1
between = 0.0924 avg = 4.5
overall = 0.0954 max = 5
Wald chi2(10) = 105.03
corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000
----------------------------------------------------------------------------------
Ginitierra | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-----------------+----------------------------------------------------------------
gueract_1 | -.0006076 .0002667 -2.28 0.023 -.0011303 -.0000849
paract_1 | .0004025 .0004813 0.84 0.403 -.0005407 .0013458
coca | -.002265 .0008711 -2.60 0.009 -.0039724 -.0005577
lpop | .0256829 .0038513 6.67 0.000 .0181345 .0332312
rainfall | -.0000101 4.02e-06 -2.51 0.012 -.000018 -2.22e-06
temperature | -.0041859 .000782 -5.35 0.000 -.0057186 -.0026531
totplots60_00 | -.0000124 5.87e-06 -2.11 0.035 -.0000239 -8.82e-07
displaced | -2.13e-07 8.08e-07 -0.26 0.792 -1.80e-06 1.37e-06
totviolencia85 | .0260579 .0074101 3.52 0.000 .0115344 .0405814
anucraids1971_78 | .0021563 .0014217 1.52 0.129 -.0006302 .0049429
_cons | .904592 .0256888 35.21 0.000 .854243 .9549411
-----------------+----------------------------------------------------------------
sigma_u | .09862827
sigma_e | .0185865
rho | .96570455 (fraction of variance due to u_i)
----------------------------------------------------------------------------------
. estimates store re
. xtreg Ginitierra gueract_1 paract_1 coca lpop rainfall temperature totplots60_00 displaced totviolencia85 anucraids1971_78, fe
note: rainfall omitted because of collinearity
note: temperature omitted because of collinearity
note: totplots60_00 omitted because of collinearity
note: totviolencia85 omitted because of collinearity
note: anucraids1971_78 omitted because of collinearity
Fixed-effects (within) regression Number of obs = 3588
Group variable: origmun Number of groups = 798
R-sq: within = 0.0107 Obs per group: min = 1
between = 0.0221 avg = 4.5
overall = 0.0194 max = 5
F(5,2785) = 6.03
corr(u_i, Xb) = -0.3879 Prob > F = 0.0000
----------------------------------------------------------------------------------
Ginitierra | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-----------------+----------------------------------------------------------------
gueract_1 | -.0005059 .0002664 -1.90 0.058 -.0010283 .0000166
paract_1 | .0003712 .0004795 0.77 0.439 -.000569 .0013115
coca | -.0018003 .0008731 -2.06 0.039 -.0035123 -.0000884
lpop | .0601981 .0129071 4.66 0.000 .0348897 .0855066
rainfall | 0 (omitted)
temperature | 0 (omitted)
totplots60_00 | 0 (omitted)
displaced | 1.43e-07 8.07e-07 0.18 0.860 -1.44e-06 1.73e-06
totviolencia85 | 0 (omitted)
anucraids1971_78 | 0 (omitted)
_cons | .949552 .0543716 17.46 0.000 .8429394 1.056165
-----------------+----------------------------------------------------------------
sigma_u | .11322651
sigma_e | .0185865
rho | .97376077 (fraction of variance due to u_i)
----------------------------------------------------------------------------------
F test that all u_i=0: F(797, 2785) = 130.44 Prob > F = 0.0000
. estimates store fe
. hausman re fe, sigmamore
Note: the rank of the differenced variance matrix (4) does not equal the number of coefficients
being tested (5); be sure this is what you expect, or there may be problems computing
the test. Examine the output of your estimators for anything unexpected and possibly
consider scaling your variables so that the coefficients are on a similar scale.
---- Coefficients ----
| (b) (B) (b-B) sqrt(diag(V_b-V_B))
| re fe Difference S.E.
-------------+----------------------------------------------------------------
gueract_1 | -.0006076 -.0005059 -.0001017 .
paract_1 | .0004025 .0003712 .0000313 .
coca | -.002265 -.0018003 -.0004647 .
lpop | .0256829 .0601981 -.0345152 .
displaced | -2.13e-07 1.43e-07 -3.56e-07 .
------------------------------------------------------------------------------
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(4) = (b-B)'[(V_b-V_B)^(-1)](b-B)
= -38.18 chi2<0 ==> model fitted on these
data fails to meet the asymptotic
assumptions of the Hausman test;
see suest for a generalized test
I have a data set that looks at the association between land inequality and counts of violence over six years (2000-2005) and for 798 municipalities. The unit of analysis is the municipality-year. I am using xtreg in Stata 13.1, and deciding whether to report the results of a fixed effects or a random effects model. The Hausman test suggests that I report the fixed effects model. However, there are several variables that are time invariant in the fixed effects model, but for which I would still like to report results (variables that are historical measures of violence from the 1970s). What are the implications if I report the results of the random effects model?
I have a second question- I get an error message in Stata as follows: “the rank of the differenced variance matrix (4) does not equal the number of coefficients being tested (5)…” Does anyone have any ideas on why I would get such an error message? The output is below. Thank you in advance,
Gabriel Nelson
PhD Sociology
xtreg Ginitierra gueract_1 paract_1 coca lpop rainfall temperature totplots60_00 displaced totviolencia85 anucraids1971_78, re
Random-effects GLS regression Number of obs = 3588
Group variable: origmun Number of groups = 798
R-sq: within = 0.0082 Obs per group: min = 1
between = 0.0924 avg = 4.5
overall = 0.0954 max = 5
Wald chi2(10) = 105.03
corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000
----------------------------------------------------------------------------------
Ginitierra | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-----------------+----------------------------------------------------------------
gueract_1 | -.0006076 .0002667 -2.28 0.023 -.0011303 -.0000849
paract_1 | .0004025 .0004813 0.84 0.403 -.0005407 .0013458
coca | -.002265 .0008711 -2.60 0.009 -.0039724 -.0005577
lpop | .0256829 .0038513 6.67 0.000 .0181345 .0332312
rainfall | -.0000101 4.02e-06 -2.51 0.012 -.000018 -2.22e-06
temperature | -.0041859 .000782 -5.35 0.000 -.0057186 -.0026531
totplots60_00 | -.0000124 5.87e-06 -2.11 0.035 -.0000239 -8.82e-07
displaced | -2.13e-07 8.08e-07 -0.26 0.792 -1.80e-06 1.37e-06
totviolencia85 | .0260579 .0074101 3.52 0.000 .0115344 .0405814
anucraids1971_78 | .0021563 .0014217 1.52 0.129 -.0006302 .0049429
_cons | .904592 .0256888 35.21 0.000 .854243 .9549411
-----------------+----------------------------------------------------------------
sigma_u | .09862827
sigma_e | .0185865
rho | .96570455 (fraction of variance due to u_i)
----------------------------------------------------------------------------------
. estimates store re
. xtreg Ginitierra gueract_1 paract_1 coca lpop rainfall temperature totplots60_00 displaced totviolencia85 anucraids1971_78, fe
note: rainfall omitted because of collinearity
note: temperature omitted because of collinearity
note: totplots60_00 omitted because of collinearity
note: totviolencia85 omitted because of collinearity
note: anucraids1971_78 omitted because of collinearity
Fixed-effects (within) regression Number of obs = 3588
Group variable: origmun Number of groups = 798
R-sq: within = 0.0107 Obs per group: min = 1
between = 0.0221 avg = 4.5
overall = 0.0194 max = 5
F(5,2785) = 6.03
corr(u_i, Xb) = -0.3879 Prob > F = 0.0000
----------------------------------------------------------------------------------
Ginitierra | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-----------------+----------------------------------------------------------------
gueract_1 | -.0005059 .0002664 -1.90 0.058 -.0010283 .0000166
paract_1 | .0003712 .0004795 0.77 0.439 -.000569 .0013115
coca | -.0018003 .0008731 -2.06 0.039 -.0035123 -.0000884
lpop | .0601981 .0129071 4.66 0.000 .0348897 .0855066
rainfall | 0 (omitted)
temperature | 0 (omitted)
totplots60_00 | 0 (omitted)
displaced | 1.43e-07 8.07e-07 0.18 0.860 -1.44e-06 1.73e-06
totviolencia85 | 0 (omitted)
anucraids1971_78 | 0 (omitted)
_cons | .949552 .0543716 17.46 0.000 .8429394 1.056165
-----------------+----------------------------------------------------------------
sigma_u | .11322651
sigma_e | .0185865
rho | .97376077 (fraction of variance due to u_i)
----------------------------------------------------------------------------------
F test that all u_i=0: F(797, 2785) = 130.44 Prob > F = 0.0000
. estimates store fe
. hausman re fe, sigmamore
Note: the rank of the differenced variance matrix (4) does not equal the number of coefficients
being tested (5); be sure this is what you expect, or there may be problems computing
the test. Examine the output of your estimators for anything unexpected and possibly
consider scaling your variables so that the coefficients are on a similar scale.
---- Coefficients ----
| (b) (B) (b-B) sqrt(diag(V_b-V_B))
| re fe Difference S.E.
-------------+----------------------------------------------------------------
gueract_1 | -.0006076 -.0005059 -.0001017 .
paract_1 | .0004025 .0003712 .0000313 .
coca | -.002265 -.0018003 -.0004647 .
lpop | .0256829 .0601981 -.0345152 .
displaced | -2.13e-07 1.43e-07 -3.56e-07 .
------------------------------------------------------------------------------
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(4) = (b-B)'[(V_b-V_B)^(-1)](b-B)
= -38.18 chi2<0 ==> model fitted on these
data fails to meet the asymptotic
assumptions of the Hausman test;
see suest for a generalized test
Comment