Hello,
I hope anyone can help me.
I have a unbalanced Panel. Hausmann leads me to use for further analysis fixed effects. Testparm and modified wald test leads me to use entity and time fixed effects and also "robust" with vce (robust) because of heteroskedasticiy. When I use xi: xtreg y x1 i.year, fe and xi: xtreg y x1 i.year, fe vce (robust) I get the same results...Did i made a mistake anywhre? Thanks in advance.

. xtset Unternehmen Jahr
panel variable: Unternehmen (unbalanced)
time variable: Jahr, 2014 to 2018, but with gaps
delta: 1 year

. xtreg Y x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11, fe

Fixed-effects (within) regression Number of obs = 342
Group variable: Unternehmen Number of groups = 79

R-sq: Obs per group:
within = 0.6964 min = 1
between = 0.3551 avg = 4.3
overall = 0.4950 max = 5

F(11,252) = 52.54
corr(u_i, Xb) = -0.2154 Prob > F = 0.0000

------------------------------------------------------------------------------
Y | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
x1 | .0121592 .015234 0.80 0.426 -.017843 .0421614
x2 | 1.885169 5.310276 0.36 0.723 -8.573006 12.34334
x3 | -.4471534 .2738079 -1.63 0.104 -.9863968 .09209
x4 | -12.6464 3.358336 -3.77 0.000 -19.26038 -6.032417
x5 | -3.154039 1.94352 -1.62 0.106 -6.981651 .6735729
x6 | 9.843865 .5781626 17.03 0.000 8.705219 10.98251
x7 | -.0105897 .0053595 -1.98 0.049 -.0211448 -.0000345
x8 | -.0909935 .1932579 -0.47 0.638 -.4716 .289613
x9 | .0042337 .179777 0.02 0.981 -.3498233 .3582906
x10 | .2618862 .1633328 1.60 0.110 -.0597851 .5835574
x11 | .286262 .1016634 2.82 0.005 .0860437 .4864802
_cons | 10.14478 64.69261 0.16 0.876 -117.2623 137.5519
-------------+----------------------------------------------------------------
sigma_u | 22.903426
sigma_e | 13.34097
rho | .74666305 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(78, 252) = 5.96 Prob > F = 0.0000

. estimates store fe

. xtreg Y x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11, re

Random-effects GLS regression Number of obs = 342
Group variable: Unternehmen Number of groups = 79

R-sq: Obs per group:
within = 0.6785 min = 1
between = 0.5220 avg = 4.3
overall = 0.6113 max = 5

Wald chi2(11) = 611.68
corr(u_i, X) = 0 (assumed) Prob > chi2 = 0.0000

------------------------------------------------------------------------------
Y | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
x1 | .0017081 .012697 0.13 0.893 -.0231775 .0265937
x2 | 1.529129 1.906254 0.80 0.422 -2.20706 5.265318
x3 | -.3607013 .2628963 -1.37 0.170 -.8759687 .1545661
x4 | -6.831479 2.186577 -3.12 0.002 -11.11709 -2.545868
x5 | -4.372107 1.993001 -2.19 0.028 -8.278317 -.4658961
x6 | 10.26525 .5341722 19.22 0.000 9.218294 11.31221
x7 | -.0058791 .0054074 -1.09 0.277 -.0164774 .0047193
x8 | .2901557 .1817283 1.60 0.110 -.0660251 .6463366
x9 | -.2081798 .1323955 -1.57 0.116 -.4676702 .0513107
x10 | .1843618 .1283733 1.44 0.151 -.0672452 .4359688
x11 | .0867639 .079641 1.09 0.276 -.0693296 .2428575
_cons | 16.62166 31.65446 0.53 0.600 -45.41994 78.66325
-------------+----------------------------------------------------------------
sigma_u | 15.001195
sigma_e | 13.34097
rho | .55837761 (fraction of variance due to u_i)
------------------------------------------------------------------------------

. estimates store re

. hausman fe re

---- Coefficients ----
| (b) (B) (b-B) sqrt(diag(V_b-V_B))
| fe re Difference S.E.
-------------+----------------------------------------------------------------
x1 | .0121592 .0017081 .0104511 .0084179
x2 | 1.885169 1.529129 .3560401 4.956332
x3 | -.4471534 -.3607013 -.0864521 .0765263
x4 | -12.6464 -6.831479 -5.814919 2.548981
x5 | -3.154039 -4.372107 1.218068 .
x6 | 9.843865 10.26525 -.4213873 .221206
x7 | -.0105897 -.0058791 -.0047106 .
x8 | -.0909935 .2901557 -.3811492 .065753
x9 | .0042337 -.2081798 .2124134 .1216191
x10 | .2618862 .1843618 .0775244 .1009847
x11 | .286262 .0867639 .199498 .0631883
------------------------------------------------------------------------------
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(11) = (b-B)'[(V_b-V_B)^(-1)](b-B)
= 76.16
Prob>chi2 = 0.0000
(V_b-V_B is not positive definite)


. xtset Unternehmen Jahr
panel variable: Unternehmen (unbalanced)
time variable: Jahr, 2014 to 2018, but with gaps
delta: 1 year

. xi: xtreg Y x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 i.Jahr, fe
i.Jahr _IJahr_2014-2018 (naturally coded; _IJahr_2014 omitted)

Fixed-effects (within) regression Number of obs = 342
Group variable: Unternehmen Number of groups = 79

R-sq: Obs per group:
within = 0.7509 min = 1
between = 0.4127 avg = 4.3
overall = 0.5609 max = 5

F(15,248) = 49.85
corr(u_i, Xb) = -0.1701 Prob > F = 0.0000


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

x1 .0091464 .0139301 0.66 0.512 -.01829 .0365829
x2 -4.252209 4.960329 -0.86 0.392 -14.02195 5.517534
x3 -.473511 .2530563 -1.87 0.062 -.9719246 .0249026
x4 -12.73621 3.099359 -4.11 0.000 -18.84064 -6.63179
x5 11.2182 3.789075 2.96 0.003 3.755325 18.68107
x6 10.09346 .5504423 18.34 0.000 9.009325 11.1776
x7 .0046431 .0086834 0.53 0.593 -.0124595 .0217458
x8 .0455602 .2440602 0.19 0.852 -.4351348 .5262552
x9 -.0980529 .1657255 -0.59 0.555 -.4244618 .228356
x10 .2070221 .1506021 1.37 0.170 -.0896001 .5036444
x11 .102173 .0971356 1.05 0.294 -.0891428 .2934889
_IJahr_2015 15.09593 3.162919 4.77 0.000 8.866322 21.32554
_IJahr_2016 21.15731 5.111523 4.14 0.000 11.08978 31.22485
_IJahr_2017 17.33039 4.970709 3.49 0.001 7.540202 27.12058
_IJahr_2018 23.44871 3.456689 6.78 0.000 16.6405 30.25692
_cons 17.31959 66.04854 0.26 0.793 -112.768 147.4072

sigma_u 21.567956
sigma_e 12.179949
rho .75819981 (fraction of variance due to u_i)

F test that all u_i=0: F(78, 248) = 6.59 Prob > F = 0.0000

. xi: regress Y x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 i.Unternehmen i.Jahr
i.Unternehmen _IUnternehm_1-79 (naturally coded; _IUnternehm_1 omitted)
i.Jahr _IJahr_2014-2018 (naturally coded; _IJahr_2014 omitted)

Source SS df MS Number of obs = 342
F(93, 248) = 23.07
Model 318227.767 93 3421.80395 Prob > F = 0.0000
Residual 36791.0876 248 148.35116 R-squared = 0.8964
Adj R-squared = 0.8575
Total 355018.854 341 1041.11101 Root MSE = 12.18


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

x1 .0091464 .0139301 0.66 0.512 -.01829 .0365829
x2 -4.252209 4.960329 -0.86 0.392 -14.02195 5.517534
x3 -.473511 .2530563 -1.87 0.062 -.9719246 .0249026
x4 -12.73621 3.099359 -4.11 0.000 -18.84064 -6.63179
x5 11.2182 3.789075 2.96 0.003 3.755325 18.68107
x6 10.09346 .5504423 18.34 0.000 9.009325 11.1776
x7 .0046431 .0086834 0.53 0.593 -.0124595 .0217458
x8 .0455602 .2440602 0.19 0.852 -.4351348 .5262552
x9 -.0980529 .1657255 -0.59 0.555 -.4244618 .228356
x10 .2070221 .1506021 1.37 0.170 -.0896001 .5036444
x11 .102173 .0971356 1.05 0.294 -.0891428 .2934889
_IUnternehm_2 1.575516 10.30654 0.15 0.879 -18.724 21.87503
_IUnternehm_3 -39.06488 10.25417 -3.81 0.000 -59.26125 -18.86852
_IUnternehm_4 -24.40019 12.7029 -1.92 0.056 -49.41951 .6191261
_IUnternehm_5 -14.42787 11.04235 -1.31 0.193 -36.17662 7.320877
_IUnternehm_6 -8.348222 9.779419 -0.85 0.394 -27.60953 10.91308
_IUnternehm_7 20.5798 15.03405 1.37 0.172 -9.030897 50.1905
_IUnternehm_8 2.41823 14.65319 0.17 0.869 -26.44234 31.2788
_IUnternehm_9 5.66785 16.76055 0.34 0.736 -27.34332 38.67902
_IUnternehm_10 -16.14584 10.02271 -1.61 0.108 -35.88633 3.594639
_IUnternehm_11 17.81726 18.40685 0.97 0.334 -18.43642 54.07094
_IUnternehm_12 19.34285 14.61768 1.32 0.187 -9.447774 48.13348
_IUnternehm_13 20.54812 12.09701 1.70 0.091 -3.277862 44.3741
_IUnternehm_14 32.32243 12.44368 2.60 0.010 7.813661 56.83119
_IUnternehm_15 -37.85379 12.83629 -2.95 0.003 -63.13584 -12.57174
_IUnternehm_16 46.11187 13.25584 3.48 0.001 20.00349 72.22025
_IUnternehm_17 -6.344185 8.112828 -0.78 0.435 -22.32301 9.634643
_IUnternehm_18 2.288403 11.73014 0.20 0.845 -20.81499 25.3918
_IUnternehm_19 2.392787 11.70008 0.20 0.838 -20.65141 25.43699
_IUnternehm_20 5.753934 18.12912 0.32 0.751 -29.95275 41.46061
_IUnternehm_21 -4.725286 11.67111 -0.40 0.686 -27.71241 18.26184
_IUnternehm_22 -16.47211 15.21205 -1.08 0.280 -46.4334 13.48917
_IUnternehm_23 -4.486927 12.41375 -0.36 0.718 -28.93675 19.9629
_IUnternehm_24 13.11413 18.38299 0.71 0.476 -23.09257 49.32082
_IUnternehm_25 9.684397 15.62584 0.62 0.536 -21.09188 40.46067
_IUnternehm_26 14.69772 15.2387 0.96 0.336 -15.31606 44.71149
_IUnternehm_27 -6.59571 14.57482 -0.45 0.651 -35.30192 22.1105
_IUnternehm_28 5.690628 11.49149 0.50 0.621 -16.94274 28.32399
_IUnternehm_29 7.263189 10.90053 0.67 0.506 -14.20623 28.73261
_IUnternehm_30 54.27688 15.65619 3.47 0.001 23.44083 85.11292
_IUnternehm_31 1.799696 14.1221 0.13 0.899 -26.01485 29.61424
_IUnternehm_32 41.18111 11.57496 3.56 0.000 18.38334 63.97887
_IUnternehm_33 9.193567 10.87896 0.85 0.399 -12.23338 30.62051
_IUnternehm_34 -18.78013 10.63879 -1.77 0.079 -39.73402 2.173762
_IUnternehm_35 -3.696596 9.635246 -0.38 0.702 -22.67394 15.28075
_IUnternehm_36 7.51152 8.79678 0.85 0.394 -9.814405 24.83744
_IUnternehm_37 7.066402 14.56265 0.49 0.628 -21.61584 35.74864
_IUnternehm_38 34.83821 10.2329 3.40 0.001 14.68374 54.99269
_IUnternehm_39 -10.7081 12.98113 -0.82 0.410 -36.27542 14.85923
_IUnternehm_40 13.68806 11.58929 1.18 0.239 -9.137929 36.51404
_IUnternehm_41 57.59317 17.35045 3.32 0.001 23.42015 91.76619
_IUnternehm_42 -3.437701 13.36429 -0.26 0.797 -29.75967 22.88427
_IUnternehm_43 -2.297358 8.450392 -0.27 0.786 -18.94105 14.34633
_IUnternehm_44 2.880239 10.46194 0.28 0.783 -17.72534 23.48582
_IUnternehm_45 -18.96786 10.9294 -1.74 0.084 -40.49414 2.55842
_IUnternehm_46 -14.54469 9.648038 -1.51 0.133 -33.54723 4.457851
_IUnternehm_47 -24.71603 10.59782 -2.33 0.020 -45.58923 -3.842824
_IUnternehm_48 23.25981 11.90508 1.95 0.052 -.1881501 46.70778
_IUnternehm_49 -6.297338 9.950548 -0.63 0.527 -25.89569 13.30102
_IUnternehm_50 18.34087 20.53314 0.89 0.373 -22.10071 58.78245
_IUnternehm_51 -18.92622 15.42757 -1.23 0.221 -49.31199 11.45954
_IUnternehm_52 -14.16451 9.746474 -1.45 0.147 -33.36092 5.031913
_IUnternehm_53 -.7125818 9.647064 -0.07 0.941 -19.7132 18.28804
_IUnternehm_54 8.41392 10.01824 0.84 0.402 -11.31775 28.14559
_IUnternehm_55 26.42424 14.99984 1.76 0.079 -3.119073 55.96755
_IUnternehm_56 -23.45135 9.192148 -2.55 0.011 -41.55599 -5.346725
_IUnternehm_57 -15.05711 9.931668 -1.52 0.131 -34.61828 4.504062
_IUnternehm_58 57.27402 13.73893 4.17 0.000 30.21415 84.33388
_IUnternehm_59 -.4294764 14.91609 -0.03 0.977 -29.80784 28.94889
_IUnternehm_60 -15.16002 8.958061 -1.69 0.092 -32.8036 2.483558
_IUnternehm_61 17.21946 8.898878 1.94 0.054 -.3075541 34.74647
_IUnternehm_62 -14.53266 10.48203 -1.39 0.167 -35.17782 6.112498
_IUnternehm_63 -6.940407 10.67026 -0.65 0.516 -27.95629 14.07548
_IUnternehm_64 -5.196539 15.06009 -0.35 0.730 -34.85853 24.46546
_IUnternehm_65 26.02929 19.90437 1.31 0.192 -13.17388 65.23246
_IUnternehm_66 14.60718 11.24314 1.30 0.195 -7.537036 36.75139
_IUnternehm_67 -22.08857 8.733508 -2.53 0.012 -39.28987 -4.887264
_IUnternehm_68 -7.113967 8.458266 -0.84 0.401 -23.77316 9.545228
_IUnternehm_69 -17.87005 11.78165 -1.52 0.131 -41.07491 5.334804
_IUnternehm_70 52.5356 12.00522 4.38 0.000 28.89041 76.18079
_IUnternehm_71 -34.25489 15.97117 -2.14 0.033 -65.71133 -2.798458
_IUnternehm_72 -8.828511 12.80215 -0.69 0.491 -34.04332 16.3863
_IUnternehm_73 21.10142 14.70096 1.44 0.152 -7.853237 50.05607
_IUnternehm_74 -20.18248 11.94858 -1.69 0.092 -43.71611 3.351144
_IUnternehm_75 12.24323 18.45948 0.66 0.508 -24.11412 48.60058
_IUnternehm_76 -12.00339 15.06139 -0.80 0.426 -41.66793 17.66115
_IUnternehm_77 5.011427 12.52339 0.40 0.689 -19.65435 29.6772
_IUnternehm_78 -29.8218 15.41626 -1.93 0.054 -60.18529 .5416937
_IUnternehm_79 -24.57285 16.59229 -1.48 0.140 -57.25261 8.106912
_IJahr_2015 15.09593 3.162919 4.77 0.000 8.866322 21.32554
_IJahr_2016 21.15731 5.111523 4.14 0.000 11.08978 31.22485
_IJahr_2017 17.33039 4.970709 3.49 0.001 7.540202 27.12058
_IJahr_2018 23.44871 3.456689 6.78 0.000 16.6405 30.25692
_cons 15.75827 61.05587 0.26 0.797 -104.4959 136.0124


. xi: xtreg Y x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 i.Jahr, fe vce(robust)
i.Jahr _IJahr_2014-2018 (naturally coded; _IJahr_2014 omitted)

Fixed-effects (within) regression Number of obs = 342
Group variable: Unternehmen Number of groups = 79

R-sq: Obs per group:
within = 0.7509 min = 1
between = 0.4127 avg = 4.3
overall = 0.5609 max = 5

F(15,78) = 37.55
corr(u_i, Xb) = -0.1701 Prob > F = 0.0000

(Std. Err. adjusted for 79 clusters in Unternehmen)

Robust
Y Coef. Std. Err. t P>t [95% Conf. Interval]

x1 .0091464 .0133006 0.69 0.494 -.017333 .0356259
x2 -4.252209 5.415393 -0.79 0.435 -15.03343 6.52901
x3 -.473511 .3681172 -1.29 0.202 -1.206376 .2593541
x4 -12.73621 3.07371 -4.14 0.000 -18.8555 -6.616927
x5 11.2182 4.267745 2.63 0.010 2.721767 19.71462
x6 10.09346 .9198481 10.97 0.000 8.262186 11.92474
x7 .0046431 .008961 0.52 0.606 -.0131968 .0224831
x8 .0455602 .2953716 0.15 0.878 -.5424795 .6335998
x9 -.0980529 .1633973 -0.60 0.550 -.4233519 .2272461
x10 .2070221 .1437574 1.44 0.154 -.0791769 .4932211
x11 .102173 .0929156 1.10 0.275 -.0828077 .2871538
_IJahr_2015 15.09593 3.107805 4.86 0.000 8.908765 21.2831
_IJahr_2016 21.15731 5.616581 3.77 0.000 9.975561 32.33907
_IJahr_2017 17.33039 5.899157 2.94 0.004 5.586071 29.07471
_IJahr_2018 23.44871 3.764808 6.23 0.000 15.95355 30.94387
_cons 17.31959 65.53958 0.26 0.792 -113.1597 147.7989

sigma_u 21.567956
sigma_e 12.179949
rho .75819981 (fraction of variance due to u_i)