Hello,
I am trying to figure out whether using fixed effects would be right for my dataset or not. So I ran Hausman test (all the codes and results posted down below) on Stata 17.0 and got chi^2 value of 6210.82 and pvalue of 0. My understanding of this is that the coefficients from these two methods are different. Based on all the comments I could find on the forum regarding this topic, I also ran xttest0 and xtoverid for looking at evidence of RE and looked at the ftest value given under the basic FE regression model. xttest0 and ftest return pvalue of 1, hence statistically insignificant, and xtoverid results in "Error - saved RE estimates are degenerate (sigma_u=0) and equivalent to pooled OLS".
Based off of the above results, am I correct in understanding that there seem to be no random effects or fixed effects evidence in my data? In which case, what factors should I consider in choosing the model since the resulting coefficients seem to be not just different but of the opposite signs (for did variable that measures the impact of the reform).
NOTE: One BIG assumption I did make was treating the dataset I have as unbalanced panel data, since my data is arrest records over a period of ten years comprising of both, individuals that only got arrested once as well as those who were arrested multiple times. Please also let me know if this assumption makes sense or if it is just wrong in which case, I guess I won't have to worry about choosing between the RE and FE models.
Just FYI:
Variable recid is an indicator variable that is my outcome of interest (Whether someone recidivated or not).
Variable NYC is an indicator variable that is 1 for the treatment group and 0 for comparison group.
Variable period is an indicator variable that is 1 for post-reform years and 0 for pre-reform years.
Variable did is the interaction variable between NYC and period.
Code:
Results:
Thank you,
Tessie
I am trying to figure out whether using fixed effects would be right for my dataset or not. So I ran Hausman test (all the codes and results posted down below) on Stata 17.0 and got chi^2 value of 6210.82 and pvalue of 0. My understanding of this is that the coefficients from these two methods are different. Based on all the comments I could find on the forum regarding this topic, I also ran xttest0 and xtoverid for looking at evidence of RE and looked at the ftest value given under the basic FE regression model. xttest0 and ftest return pvalue of 1, hence statistically insignificant, and xtoverid results in "Error - saved RE estimates are degenerate (sigma_u=0) and equivalent to pooled OLS".
Based off of the above results, am I correct in understanding that there seem to be no random effects or fixed effects evidence in my data? In which case, what factors should I consider in choosing the model since the resulting coefficients seem to be not just different but of the opposite signs (for did variable that measures the impact of the reform).
NOTE: One BIG assumption I did make was treating the dataset I have as unbalanced panel data, since my data is arrest records over a period of ten years comprising of both, individuals that only got arrested once as well as those who were arrested multiple times. Please also let me know if this assumption makes sense or if it is just wrong in which case, I guess I won't have to worry about choosing between the RE and FE models.
Just FYI:
Variable recid is an indicator variable that is my outcome of interest (Whether someone recidivated or not).
Variable NYC is an indicator variable that is 1 for the treatment group and 0 for comparison group.
Variable period is an indicator variable that is 1 for post-reform years and 0 for pre-reform years.
Variable did is the interaction variable between NYC and period.
Code:
Code:
xtreg recid NYC period did i.age_at_referral detention female black aian apac others months_disposition crime sentence, fe estimates store FE xtreg recid NYC period did i.age_at_referral detention female black aian apac others months_disposition crime sentence, re estimates store RE hausman FE RE xtreg recid NYC period did age_at_referral detention female priors black aian apac others months_disposition crime sentence, re xttest0 xtreg recid NYC period did age_at_referral detention female priors black aian apac others months_disposition crime sentence, re xtoverid
Code:
. hausman FE RE
---- Coefficients ----
| (b) (B) (b-B) sqrt(diag(V_b-V_B))
| FE RE Difference Std. err.
-------------+----------------------------------------------------------------
period | .0269027 -.0145596 .0414623 .0171847
did | -.238991 .0205378 -.2595288 .0256904
age_at_ref~l |
8 | -.1536068 -.0183521 -.1352548 .2057408
9 | .1111279 .0985027 .0126252 .1947722
10 | .0490475 .1266118 -.0775643 .1891517
11 | -.0134521 .1561825 -.1696346 .1875792
12 | -.0704445 .1710725 -.241517 .1870724
13 | -.1514975 .1644222 -.3159198 .1870328
14 | -.3365617 .1144997 -.4510614 .1870126
15 | -.6916833 .0187925 -.7104757 .1871177
16 | -.7965494 -.0019071 -.7946423 .1872656
17 | -.6729545 .04075 -.7137045 .1881347
18 | -1.00835 -.1171273 -.8912228 .2425487
19 | -1.130377 -.1023546 -1.028022 .5112882
20 | -1.226667 -.0902022 -1.136464 .5678978
detention | -.0180171 .0294451 -.0474622 .0085318
female | .1646985 -.061258 .2259566 .2173381
black | .0929615 .1006317 -.0076702 .0386526
aian | .5187224 .0357863 .4829361 .3063131
apac | .4963192 .0196628 .4766565 .2726107
others | .1107559 .0459501 .0648059 .0805111
months_dis~n | -.0164606 -.0078322 -.0086284 .0007935
crime | .2458138 .2228034 .0230104 .0066743
sentence | -.1034218 -.0107227 -.0926991 .0041723
------------------------------------------------------------------------------
b = Consistent under H0 and Ha; obtained from xtreg.
B = Inconsistent under Ha, efficient under H0; obtained from xtreg.
Test of H0: Difference in coefficients not systematic
chi2(24) = (b-B)'[(V_b-V_B)^(-1)](b-B)
= 6210.82
Prob > chi2 = 0.0000
. xttest0
Breusch and Pagan Lagrangian multiplier test for random effects
recid[id,t] = Xb + u[id] + e[id,t]
Estimated results:
| Var SD = sqrt(Var)
---------+-----------------------------
recid | .1515245 .3892615
e | .2083827 .4564896
u | 0 0
Test: Var(u) = 0
chibar2(01) = 0.00
Prob > chibar2 = 1.0000
. xtoverid
Error - saved RE estimates are degenerate (sigma_u=0) and equivalent to pooled OLS
r(198);
. xtreg recid NYC period did i.age_at_referral detention female black aian apac others months_disposition crime sent
> ence, fe
note: NYC omitted because of collinearity.
note: 21.age_at_referral omitted because of collinearity.
Fixed-effects (within) regression Number of obs = 161,743
Group variable: id Number of groups = 118,539
R-squared: Obs per group:
Within = 0.1911 min = 1
Between = 0.0273 avg = 1.4
Overall = 0.0700 max = 15
F(24,43180) = 424.98
corr(u_i, Xb) = -0.5813 Prob > F = 0.0000
------------------------------------------------------------------------------------
recid | Coefficient Std. err. t P>|t| [95% conf. interval]
-------------------+----------------------------------------------------------------
NYC | 0 (omitted)
period | .0269027 .0173667 1.55 0.121 -.0071363 .0609417
did | -.238991 .0260089 -9.19 0.000 -.289969 -.1880131
|
age_at_referral |
Eight | -.1536068 .2149489 -0.71 0.475 -.5749107 .2676971
Nine | .1111279 .2032296 0.55 0.585 -.2872059 .5094618
Ten | .0490475 .1972719 0.25 0.804 -.3376093 .4357042
Eleven | -.0134521 .1955004 -0.07 0.945 -.3966365 .3697324
Twelve | -.0704445 .1949255 -0.36 0.718 -.4525022 .3116131
Thirteen | -.1514975 .1948625 -0.78 0.437 -.5334317 .2304366
Fourteen | -.3365617 .1948357 -1.73 0.084 -.7184433 .0453199
Fifteen | -.6916833 .1949336 -3.55 0.000 -1.073757 -.3096098
Sixteen | -.7965494 .1950866 -4.08 0.000 -1.178923 -.4141761
Seventeen | -.6729545 .1959731 -3.43 0.001 -1.057065 -.2888435
Eighteen | -1.00835 .25363 -3.98 0.000 -1.50547 -.5112305
Nineteen | -1.130377 .52072 -2.17 0.030 -2.150998 -.1097555
Twenty | -1.226667 .5863565 -2.09 0.036 -2.375936 -.0773969
Twenty-one | 0 (omitted)
|
detention | -.0180171 .0094018 -1.92 0.055 -.0364448 .0004107
female | .1646985 .2173474 0.76 0.449 -.2613066 .5907036
black | .0929615 .0387051 2.40 0.016 .0170987 .1688242
aian | .5187224 .3066442 1.69 0.091 -.082306 1.119751
apac | .4963192 .2728258 1.82 0.069 -.0384246 1.031063
others | .1107559 .0806555 1.37 0.170 -.0473305 .2688423
months_disposition | -.0164606 .0008344 -19.73 0.000 -.0180961 -.0148252
crime | .2458138 .0070391 34.92 0.000 .2320171 .2596106
sentence | -.1034218 .0045597 -22.68 0.000 -.112359 -.0944846
_cons | .5407805 .207441 2.61 0.009 .1341921 .9473688
-------------------+----------------------------------------------------------------
sigma_u | .34941011
sigma_e | .45105891
rho | .37502868 (fraction of variance due to u_i)
------------------------------------------------------------------------------------
F test that all u_i=0: F(118538, 43180) = 0.50 Prob > F = 1.0000
Tessie

Comment