Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
st: FW: estimated autocorrelation coefficient changes sign when dummy variables are included
From
Lopa Chakraborti <[email protected]>
To
"[email protected]" <[email protected]>
Subject
st: FW: estimated autocorrelation coefficient changes sign when dummy variables are included
Date
Mon, 28 Feb 2011 08:35:18 -0500
Dear Statalist experts,
Please see my query below. I am really hoping that I would be able to get some advice on this matter.
sincerely
Lopa
________________________________________
From: Lopa Chakraborti
Sent: Friday, February 25, 2011 4:26 PM
To: [email protected]
Subject: estimated autocorrelation coefficient changes sign when dummy variables are included
Hi,
I am running xtpcse with and without plant level dummy variables models 2 and 1, respectively. The two models are otherwise identical. The estimated autocorrelation coefficient changes sign from positive in model 1 to negative in model 2 when dummy variables are included. I am wondering if controlling for plant fixed effects by including dummy variables is appropriate in xtpcse/xtgls models. The estimated autocorrelation coefficient is positive when I use xtregar with fe option [model 3]. From the Hausman test of fixed versus random effects [models 3 and 4 respectively] it shows that controlling for plant fixed effects is required.
thanks much for any help and advice
Lopa
model 1:
. xtpcse lseaavglqavfoia04avglbs2 lagseaavgwqfoia04avg3 lagseaavgflowfoia04avg3 elec food mill paper chem petro rubber leather metal transp secu just rnwhite mhhi carpl manuf popt popu MD PA , hetonly corr(ar1)
Number of gaps in sample: 119
(note: computations for rho restarted at each gap)
(note: estimates of rho outside [-1,1] bounded to be in the range [-1,1])
Prais-Winsten regression, heteroskedastic panels corrected standard errors
Group variable: npid Number of obs = 411
Time variable: seasoncycle Number of groups = 88
Panels: heteroskedastic (unbalanced) Obs per group: min = 2
Autocorrelation: common AR(1) avg = 4.670455
max = 10
Estimated covariances = 88 R-squared = 0.9053
Estimated autocorrelations = 1 Wald chi2(21) = 7309.21
Estimated coefficients = 22 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
| Het-corrected
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
lagseaavgw~3 | .0175739 .0096651 1.82 0.069 -.0013695 .0365172
lagseaavgf~3 | .0141308 .0035826 3.94 0.000 .0071089 .0211526
elec | -1.274798 .2237193 -5.70 0.000 -1.713279 -.836316
food | -.7037066 .4622545 -1.52 0.128 -1.609709 .2022955
mill | .1025684 .1902175 0.54 0.590 -.2702511 .475388
paper | 1.753649 .1934481 9.07 0.000 1.374498 2.132801
chem | -1.145819 .2759653 -4.15 0.000 -1.686701 -.6049368
petro | -.6660155 .2932991 -2.27 0.023 -1.240871 -.0911599
rubber | -4.779963 .2134669 -22.39 0.000 -5.19835 -4.361575
leather | -.8598458 .3122449 -2.75 0.006 -1.471834 -.247857
metal | -3.334442 .3719062 -8.97 0.000 -4.063365 -2.60552
transp | (dropped)
secu | -1.785632 .1604453 -11.13 0.000 -2.100099 -1.471165
just | -.6692307 .1983626 -3.37 0.001 -1.058014 -.2804472
rnwhite | .0042574 .0044486 0.96 0.339 -.0044616 .0129765
mhhi | .0220234 .0088036 2.50 0.012 .0047688 .0392781
carpl | .0159484 .015213 1.05 0.294 -.0138686 .0457654
manuf | .000531 .0054583 0.10 0.922 -.0101671 .0112291
popt | .0174839 .0044007 3.97 0.000 .0088586 .0261091
popu | .0032925 .0024354 1.35 0.176 -.0014809 .0080658
MD | -.832088 .1614986 -5.15 0.000 -1.148619 -.5155565
PA | -.2565289 .3490807 -0.73 0.462 -.9407145 .4276567
_cons | 5.353551 .368632 14.52 0.000 4.631045 6.076056
-------------+----------------------------------------------------------------
rho | .7916129
------------------------------------------------------------------------------
model 2:
. xtpcse lseaavglqavfoia04avglbs2 lagseaavgwqfoia04avg3 lagseaavgflowfoia04avg3 elec food mill paper chem petro rubber leather metal transp secu just rnwhite mhhi carpl manuf popt popu MD PA plantdum*, hetonly corr(ar1)
Number of gaps in sample: 119
(note: computations for rho restarted at each gap)
(note: estimates of rho outside [-1,1] bounded to be in the range [-1,1])
Prais-Winsten regression, heteroskedastic panels corrected standard errors
Group variable: npid Number of obs = 411
Time variable: seasoncycle Number of groups = 88
Panels: heteroskedastic (unbalanced) Obs per group: min = 2
Autocorrelation: common AR(1) avg = 4.670455
max = 10
Estimated covariances = 88 R-squared = 0.9822
Estimated autocorrelations = 1 Wald chi2(89) = 1.44e+07
Estimated coefficients = 89 Prob > chi2 = 0.0000
------------------------------------------------------------------------------
| Het-corrected
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
lagseaavgw~3 | .0180936 .0071236 2.54 0.011 .0041316 .0320556
lagseaavgf~3 | .0181603 .0008675 20.93 0.000 .01646 .0198607
elec | (dropped)
food | -4.603288 .236761 -19.44 0.000 -5.067331 -4.139245
mill | -1.579772 .4555319 -3.47 0.001 -2.472598 -.6869456
paper | 1.039548 .1012485 10.27 0.000 .8411045 1.237991
chem | -2.747028 .1853032 -14.82 0.000 -3.110215 -2.38384
petro | -.099715 .0818765 -1.22 0.223 -.26019 .06076
rubber | -5.590311 .1229184 -45.48 0.000 -5.831227 -5.349396
leather | -1.408918 .3117076 -4.52 0.000 -2.019854 -.7979828
metal | -5.642789 .1517692 -37.18 0.000 -5.940251 -5.345326
transp | (dropped)
secu | -2.705448 .1586987 -17.05 0.000 -3.016492 -2.394404
just | -.4976849 .0287418 -17.32 0.000 -.5540178 -.441352
rnwhite | .033415 .0011554 28.92 0.000 .0311503 .0356796
mhhi | .0687624 .0027268 25.22 0.000 .063418 .0741068
carpl | .1050512 .0049816 21.09 0.000 .0952874 .1148149
manuf | .059941 .0017845 33.59 0.000 .0564434 .0634385
popt | -.013566 .0049359 -2.75 0.006 -.0232401 -.0038919
popu | .0214322 .0003912 54.78 0.000 .0206654 .0221989
MD | .6438677 .1216639 5.29 0.000 .4054109 .8823245
PA | -.3290206 .1106896 -2.97 0.003 -.5459682 -.1120729
plantdum2 | (dropped)
plantdum3 | (dropped)
plantdum4 | (dropped)
plantdum5 | (dropped)
plantdum6 | -.8737521 .2218897 -3.94 0.000 -1.308648 -.4388563
plantdum7 | -1.106989 .1822593 -6.07 0.000 -1.464211 -.7497677
plantdum8 | .3478083 .1596061 2.18 0.029 .0349861 .6606306
plantdum9 | -1.946071 .2701609 -7.20 0.000 -2.475577 -1.416566
plantdum10 | .2056404 .2093001 0.98 0.326 -.2045802 .615861
plantdum11 | -.9707295 .08547 -11.36 0.000 -1.138248 -.8032113
plantdum12 | (dropped)
plantdum13 | .0850417 .1997274 0.43 0.670 -.3064168 .4765002
plantdum14 | (dropped)
plantdum15 | 1.872152 .0898308 20.84 0.000 1.696087 2.048217
plantdum16 | -.727815 .1884699 -3.86 0.000 -1.097209 -.3584207
plantdum17 | -2.288263 .2261976 -10.12 0.000 -2.731602 -1.844923
plantdum18 | .2269513 .1408603 1.61 0.107 -.0491297 .5030324
plantdum19 | -1.168687 .1662243 -7.03 0.000 -1.494481 -.8428932
plantdum20 | .5467179 .1741751 3.14 0.002 .2053409 .8880948
plantdum21 | -1.407528 .1072642 -13.12 0.000 -1.617762 -1.197294
plantdum22 | .7337238 .2054737 3.57 0.000 .3310027 1.136445
plantdum23 | (dropped)
plantdum24 | (dropped)
plantdum25 | -2.116513 .2587528 -8.18 0.000 -2.623659 -1.609367
plantdum26 | (dropped)
plantdum27 | (dropped)
plantdum28 | (dropped)
plantdum29 | (dropped)
plantdum30 | (dropped)
plantdum31 | .0519363 .2364972 0.22 0.826 -.4115898 .5154623
plantdum32 | 5.76572 .167844 34.35 0.000 5.436751 6.094688
plantdum33 | (dropped)
plantdum34 | (dropped)
plantdum35 | (dropped)
plantdum36 | 7.096475 .1449033 48.97 0.000 6.812469 7.38048
plantdum37 | (dropped)
plantdum38 | (dropped)
plantdum39 | (dropped)
plantdum40 | 7.260004 .2132947 34.04 0.000 6.841954 7.678054
plantdum41 | 1.41097 .0983095 14.35 0.000 1.218287 1.603653
plantdum42 | -.9692919 .0296649 -32.67 0.000 -1.027434 -.9111497
plantdum43 | 1.084792 .0795524 13.64 0.000 .9288723 1.240712
plantdum44 | 1.225428 .1070797 11.44 0.000 1.015556 1.4353
plantdum45 | (dropped)
plantdum46 | (dropped)
plantdum47 | 4.555706 .150157 30.34 0.000 4.261403 4.850008
plantdum48 | 2.111834 .2632353 8.02 0.000 1.595902 2.627766
plantdum49 | 4.718928 .1469579 32.11 0.000 4.430895 5.00696
plantdum50 | 2.041079 .1658375 12.31 0.000 1.716044 2.366115
plantdum51 | (dropped)
plantdum52 | 1.992393 .4519647 4.41 0.000 1.106558 2.878227
plantdum53 | .7984359 .4564329 1.75 0.080 -.0961562 1.693028
plantdum54 | 2.395141 .2303797 10.40 0.000 1.943606 2.846677
plantdum55 | 3.523936 .1679183 20.99 0.000 3.194822 3.85305
plantdum56 | (dropped)
plantdum57 | (dropped)
plantdum58 | (dropped)
plantdum59 | 1.060518 .0548449 19.34 0.000 .9530237 1.168012
plantdum60 | (dropped)
plantdum61 | (dropped)
plantdum62 | 1.633855 .4632306 3.53 0.000 .7259401 2.541771
plantdum63 | (dropped)
plantdum64 | .1792942 .028385 6.32 0.000 .1236606 .2349277
plantdum65 | -.8104991 .1174556 -6.90 0.000 -1.040708 -.5802903
plantdum66 | -2.504236 .119425 -20.97 0.000 -2.738305 -2.270168
plantdum67 | -.2978648 .0570631 -5.22 0.000 -.4097065 -.1860232
plantdum68 | -.5260572 .101494 -5.18 0.000 -.7249818 -.3271327
plantdum69 | 2.412183 .0613695 39.31 0.000 2.291901 2.532465
plantdum70 | .1437169 .0591522 2.43 0.015 .0277806 .2596531
plantdum71 | 2.87729 .0947743 30.36 0.000 2.691536 3.063044
plantdum72 | .3985812 .1838042 2.17 0.030 .0383316 .7588308
plantdum73 | -.948565 .0512311 -18.52 0.000 -1.048976 -.8481538
plantdum74 | 1.484547 .0595253 24.94 0.000 1.36788 1.601215
plantdum75 | -.2724068 .0815195 -3.34 0.001 -.4321821 -.1126316
plantdum76 | -1.063033 .1385774 -7.67 0.000 -1.33464 -.7914264
plantdum77 | 1.452853 .0594178 24.45 0.000 1.336396 1.56931
plantdum78 | 2.14592 .1364149 15.73 0.000 1.878552 2.413288
plantdum79 | -2.251174 .1105202 -20.37 0.000 -2.467789 -2.034558
plantdum80 | .5619839 .047046 11.95 0.000 .4697754 .6541925
plantdum81 | .4208893 .0913233 4.61 0.000 .2418988 .5998797
plantdum82 | 1.527783 .0453195 33.71 0.000 1.438959 1.616608
plantdum83 | (dropped)
plantdum84 | 1.125875 .0432152 26.05 0.000 1.041175 1.210575
plantdum85 | 1.591836 .0577172 27.58 0.000 1.478713 1.70496
plantdum86 | 4.006383 .1716238 23.34 0.000 3.670006 4.342759
plantdum87 | (dropped)
plantdum88 | .6000273 .1352842 4.44 0.000 .334875 .8651795
plantdum89 | -2.0558 .0780075 -26.35 0.000 -2.208691 -1.902908
plantdum90 | 1.633073 .0935017 17.47 0.000 1.449813 1.816333
plantdum91 | .415067 .0848474 4.89 0.000 .2487693 .5813648
plantdum92 | 1.401441 .1117379 12.54 0.000 1.182439 1.620443
plantdum93 | 1.086346 .0447443 24.28 0.000 .9986492 1.174044
plantdum94 | .3558804 .1996679 1.78 0.075 -.0354614 .7472222
plantdum95 | .5308524 .0447122 11.87 0.000 .4432181 .6184866
plantdum96 | 1.02588 .2040099 5.03 0.000 .6260276 1.425732
plantdum97 | 2.448062 .1789877 13.68 0.000 2.097252 2.798871
plantdum98 | .6660908 .1088542 6.12 0.000 .4527406 .879441
plantdum99 | -2.903657 .0883717 -32.86 0.000 -3.076862 -2.730451
plantdum100 | -1.274899 .0404559 -31.51 0.000 -1.354191 -1.195607
_cons | (dropped)
-------------+----------------------------------------------------------------
rho | -.2280014
------------------------------------------------------------------------------
model 3:
. xtregar lseaavglqavfoia04avglbs2 lagseaavgwqfoia04avg3 lagseaavgflowfoia04avg3 elec food mill paper chem petro rubber leather metal transp secu just rnwhite mhhi carpl manuf popt popu MD PA ,fe
note: lagseaavgflowfoia04avg3 dropped due to collinearity
note: elec dropped due to collinearity
note: food dropped due to collinearity
note: mill dropped due to collinearity
note: paper dropped due to collinearity
note: chem dropped due to collinearity
note: petro dropped due to collinearity
note: rubber dropped due to collinearity
note: leather dropped due to collinearity
note: metal dropped due to collinearity
note: transp dropped due to collinearity
note: secu dropped due to collinearity
note: just dropped due to collinearity
note: rnwhite dropped due to collinearity
note: mhhi dropped due to collinearity
note: carpl dropped due to collinearity
note: manuf dropped due to collinearity
note: popt dropped due to collinearity
note: popu dropped due to collinearity
note: MD dropped due to collinearity
note: PA dropped due to collinearity
FE (within) regression with AR(1) disturbances Number of obs = 323
Group variable (i): npid Number of groups = 88
R-sq: within = 0.9181 Obs per group: min = 1
between = 0.0837 avg = 3.7
overall = 0.0136 max = 9
F(1,234) = 2624.70
corr(u_i, Xb) = -0.2625 Prob > F = 0.0000
------------------------------------------------------------------------------
lseaavglqa~2 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
lagseaavgw~3 | .3303635 .0064484 51.23 0.000 .3176591 .3430679
_cons | 6.462695 .0293006 220.57 0.000 6.404968 6.520421
-------------+----------------------------------------------------------------
rho_ar | .72041395
sigma_u | 1.5826877
sigma_e | .42485831
rho_fov | .93278311 (fraction of variance due to u_i)
------------------------------------------------------------------------------
F test that all u_i=0: F(87,234) = 5.44 Prob > F = 0.0000
. estimates store fe
model 4:
. xtregar lseaavglqavfoia04avglbs2 lagseaavgwqfoia04avg3 lagseaavgflowfoia04avg3 elec food mill paper chem petro rubber leather metal transp secu just rnwhite mhhi carpl manuf popt popu MD PA
RE GLS regression with AR(1) disturbances Number of obs = 411
Group variable (i): npid Number of groups = 88
R-sq: within = 0.0233 Obs per group: min = 2
between = 0.5535 avg = 4.7
overall = 0.5000 max = 10
Wald chi2(22) = 129.40
corr(u_i, Xb) = 0 (assumed) Prob > chi2 = 0.0000
------------------- theta --------------------
min 5% median 95% max
0.7118 0.7118 0.8239 0.8463 0.8619
------------------------------------------------------------------------------
lseaavglqa~2 | Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
lagseaavgw~3 | .0224174 .0046985 4.77 0.000 .0132084 .0316263
lagseaavgf~3 | .0160294 .0043707 3.67 0.000 .0074629 .0245959
elec | -1.390232 1.0631 -1.31 0.191 -3.473869 .6934058
food | -1.06088 .6023092 -1.76 0.078 -2.241385 .1196241
mill | -.0823007 .5450267 -0.15 0.880 -1.150533 .9859319
paper | 1.496774 .540306 2.77 0.006 .4377936 2.555754
chem | -.9555481 .3960903 -2.41 0.016 -1.731871 -.1792253
petro | -.7947746 .5813898 -1.37 0.172 -1.934278 .3447286
rubber | -4.717306 1.051812 -4.48 0.000 -6.77882 -2.655793
leather | -1.087977 .759365 -1.43 0.152 -2.576305 .4003515
metal | -3.414902 1.115013 -3.06 0.002 -5.600287 -1.229517
transp | (dropped)
secu | -1.77943 .7244329 -2.46 0.014 -3.199292 -.3595675
just | -.6679765 1.034483 -0.65 0.518 -2.695525 1.359572
rnwhite | .0026329 .0083482 0.32 0.752 -.0137292 .0189949
mhhi | .0178696 .0149918 1.19 0.233 -.0115138 .047253
carpl | .0265838 .027233 0.98 0.329 -.0267919 .0799595
manuf | .0036588 .0119338 0.31 0.759 -.019731 .0270487
popt | .0142818 .009748 1.47 0.143 -.0048239 .0333875
popu | .0039242 .003679 1.07 0.286 -.0032865 .0111349
MD | -.753159 .3175429 -2.37 0.018 -1.375532 -.1307863
PA | -.1461052 .4249701 -0.34 0.731 -.9790313 .6868209
_cons | 5.231199 .7215216 7.25 0.000 3.817042 6.645355
-------------+----------------------------------------------------------------
rho_ar | .72041395 (estimated autocorrelation coefficient)
sigma_u | .91797171
sigma_e | .20657905
rho_fov | .95179867 (fraction of variance due to u_i)
------------------------------------------------------------------------------
. hausman fe .
---- Coefficients ----
| (b) (B) (b-B) sqrt(diag(V_b-V_B))
| fe . Difference S.E.
-------------+----------------------------------------------------------------
lagseaavgw~3 | .3303635 .0224174 .3079461 .0044165
------------------------------------------------------------------------------
b = consistent under Ho and Ha; obtained from xtregar
B = inconsistent under Ha, efficient under Ho; obtained from xtregar
Test: Ho: difference in coefficients not systematic
chi2(1) = (b-B)'[(V_b-V_B)^(-1)](b-B)
= 4861.66
Prob>chi2 = 0.0000
*
* For searches and help try:
* http://www.stata.com/help.cgi?search
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/