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]
RE: re:RE: st: FW: comparing xtregar coefficients across models
From
Lopa Chakraborti <[email protected]>
To
"[email protected]" <[email protected]>
Subject
RE: re:RE: st: FW: comparing xtregar coefficients across models
Date
Sat, 26 Feb 2011 10:47:51 -0500
Thanks much, I tried this and it gives me an error message that matrix is not positive definite. please see output below.
thanks much for your advice
Lopa
-----------------------------------------
. reg lseaavglcavfoia04avg2 lagseaavgwqfoia04avg3 lagseaavgflowfoia04avg3 elec food mill paper chem petro rubber leather metal transp secu just rnwhite mhhi carpl manuf popt popu MD PA plantdum*
Source | SS df MS Number of obs = 352
-------------+------------------------------ F( 81, 270) = 29.69
Model | 74.3830789 81 .918309617 Prob > F = 0.0000
Residual | 8.35055771 270 .030927992 R-squared = 0.8991
-------------+------------------------------ Adj R-squared = 0.8688
Total | 82.7336366 351 .235708367 Root MSE = .17586
------------------------------------------------------------------------------
lseaavglca~2 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
lagseaavgw~3 | .0244351 .0055078 4.44 0.000 .0135914 .0352788
lagseaavgf~3 | .0002222 .000091 2.44 0.015 .0000431 .0004013
elec | .2129178 .1553 1.37 0.172 -.0928351 .5186708
food | .6418354 .1638784 3.92 0.000 .3191935 .9644773
mill | -.5982965 .1463387 -4.09 0.000 -.8864065 -.3101865
paper | 1.392938 .1419705 9.81 0.000 1.113428 1.672448
chem | .3565779 .1049817 3.40 0.001 .149891 .5632648
petro | 1.065165 .1819125 5.86 0.000 .7070174 1.423312
rubber | .7635493 .1233743 6.19 0.000 .5206514 1.006447
leather | 1.137499 .1207305 9.42 0.000 .8998057 1.375191
metal | (dropped)
transp | .9737299 .1848082 5.27 0.000 .6098817 1.337578
secu | -.544829 .1026343 -5.31 0.000 -.7468943 -.3427637
just | .2042363 .1289666 1.58 0.114 -.0496717 .4581443
rnwhite | -.0101692 .002526 -4.03 0.000 -.0151425 -.0051959
mhhi | -.0352105 .0043875 -8.03 0.000 -.0438486 -.0265724
carpl | .0311664 .0082184 3.79 0.000 .014986 .0473467
manuf | .0053568 .0032454 1.65 0.100 -.0010327 .0117463
popt | -.0141587 .0036555 -3.87 0.000 -.0213557 -.0069618
popu | .0041006 .0012129 3.38 0.001 .0017127 .0064885
MD | .4135289 .090566 4.57 0.000 .2352235 .5918342
PA | -.2549483 .1045019 -2.44 0.015 -.4606904 -.0492061
plantdum1 | (dropped)
plantdum2 | (dropped)
plantdum3 | .7691394 .2183276 3.52 0.001 .3392984 1.19898
plantdum4 | .3207876 .1874215 1.71 0.088 -.0482059 .689781
plantdum5 | -.1197976 .145346 -0.82 0.411 -.4059533 .1663581
plantdum6 | .3316406 .1206477 2.75 0.006 .0941107 .5691704
plantdum7 | -.1728694 .1349296 -1.28 0.201 -.4385174 .0927785
plantdum8 | .2693357 .1272146 2.12 0.035 .018877 .5197944
plantdum9 | .4687905 .134595 3.48 0.001 .2038014 .7337797
plantdum10 | .1082983 .1236713 0.88 0.382 -.1351844 .351781
plantdum11 | .4401668 .111727 3.94 0.000 .2202 .6601336
plantdum12 | (dropped)
plantdum13 | .9341648 .1372759 6.81 0.000 .6638976 1.204432
plantdum14 | (dropped)
plantdum15 | -.2610163 .1134563 -2.30 0.022 -.4843878 -.0376448
plantdum16 | -.3005526 .0995102 -3.02 0.003 -.4964672 -.104638
plantdum17 | 1.127408 .1719219 6.56 0.000 .7889304 1.465886
plantdum18 | .1197784 .1387065 0.86 0.389 -.1533054 .3928622
plantdum19 | .6954829 .1493805 4.66 0.000 .4013843 .9895815
plantdum20 | -.2337304 .1291041 -1.81 0.071 -.4879091 .0204483
plantdum21 | -.6068917 .1116414 -5.44 0.000 -.8266902 -.3870933
plantdum22 | .8740887 .1400511 6.24 0.000 .5983576 1.14982
plantdum23 | (dropped)
plantdum24 | (dropped)
plantdum25 | .2823287 .1466988 1.92 0.055 -.0064902 .5711476
plantdum26 | (dropped)
plantdum27 | (dropped)
plantdum28 | (dropped)
plantdum29 | (dropped)
plantdum30 | -.4708984 .1497293 -3.14 0.002 -.7656837 -.1761131
plantdum31 | -.438786 .1401342 -3.13 0.002 -.7146806 -.1628914
plantdum32 | (dropped)
plantdum33 | (dropped)
plantdum34 | (dropped)
plantdum35 | (dropped)
plantdum36 | 1.677517 .1999398 8.39 0.000 1.283877 2.071156
plantdum37 | -1.120505 .2064769 -5.43 0.000 -1.527015 -.7139958
plantdum38 | (dropped)
plantdum39 | (dropped)
plantdum40 | (dropped)
plantdum41 | (dropped)
plantdum42 | .3959486 .2031939 1.95 0.052 -.0040973 .7959946
plantdum43 | (dropped)
plantdum44 | .3073807 .1520871 2.02 0.044 .0079534 .6068081
plantdum45 | (dropped)
plantdum46 | 1.059297 .2276764 4.65 0.000 .6110499 1.507543
plantdum47 | (dropped)
plantdum48 | (dropped)
plantdum49 | (dropped)
plantdum50 | (dropped)
plantdum51 | (dropped)
plantdum52 | (dropped)
plantdum53 | (dropped)
plantdum54 | (dropped)
plantdum55 | (dropped)
plantdum56 | (dropped)
plantdum57 | -1.485141 .1771269 -8.38 0.000 -1.833867 -1.136416
plantdum58 | (dropped)
plantdum59 | (dropped)
plantdum60 | .0049676 .1078474 0.05 0.963 -.2073612 .2172965
plantdum61 | (dropped)
plantdum62 | .6261735 .1573913 3.98 0.000 .3163033 .9360437
plantdum63 | (dropped)
plantdum64 | (dropped)
plantdum65 | .3145512 .1245209 2.53 0.012 .0693957 .5597066
plantdum66 | .4343607 .1684908 2.58 0.010 .1026379 .7660836
plantdum67 | .3972986 .1205552 3.30 0.001 .1599508 .6346463
plantdum68 | .0847565 .1186456 0.71 0.476 -.1488317 .3183447
plantdum69 | .0080616 .1749662 0.05 0.963 -.33641 .3525331
plantdum70 | -.0560417 .1342002 -0.42 0.677 -.3202535 .2081701
plantdum71 | -.3220523 .1773703 -1.82 0.071 -.671257 .0271525
plantdum72 | .3486675 .115761 3.01 0.003 .1207586 .5765764
plantdum73 | -.9518247 .103831 -9.17 0.000 -1.156246 -.7474033
plantdum74 | .2476029 .1395782 1.77 0.077 -.027197 .5224029
plantdum75 | .836097 .1319316 6.34 0.000 .5763515 1.095843
plantdum76 | (dropped)
plantdum77 | -1.273264 .1531924 -8.31 0.000 -1.574868 -.9716609
plantdum78 | -.8138779 .1587562 -5.13 0.000 -1.126435 -.5013204
plantdum79 | (dropped)
plantdum80 | (dropped)
plantdum81 | .4791252 .1361514 3.52 0.001 .2110719 .7471785
plantdum82 | .3582504 .1440961 2.49 0.014 .0745556 .6419452
plantdum83 | (dropped)
plantdum84 | .1810186 .125488 1.44 0.150 -.0660407 .428078
plantdum85 | .255044 .0995309 2.56 0.011 .0590885 .4509994
plantdum86 | .5843352 .1984682 2.94 0.004 .1935931 .9750773
plantdum87 | .2002266 .182147 1.10 0.273 -.1583824 .5588357
plantdum88 | .4258173 .1348069 3.16 0.002 .160411 .6912236
plantdum89 | -.4737271 .127686 -3.71 0.000 -.725114 -.2223403
plantdum90 | .3987519 .1199636 3.32 0.001 .1625689 .6349349
plantdum91 | .3239533 .1312942 2.47 0.014 .0654627 .582444
plantdum92 | .0377316 .1267357 0.30 0.766 -.2117843 .2872475
plantdum93 | .3878477 .1412138 2.75 0.006 .1098275 .6658678
plantdum94 | -.310689 .117598 -2.64 0.009 -.5422147 -.0791634
plantdum95 | .0552001 .1330037 0.42 0.678 -.2066562 .3170563
plantdum96 | 1.309711 .1786096 7.33 0.000 .9580666 1.661356
plantdum97 | .3827637 .1555005 2.46 0.014 .0766161 .6889113
plantdum98 | .6087197 .1418621 4.29 0.000 .3294231 .8880163
plantdum99 | (dropped)
plantdum100 | -.2926673 .1147111 -2.55 0.011 -.5185092 -.0668253
_cons | 3.337349 .2611877 12.78 0.000 2.823125 3.851572
------------------------------------------------------------------------------
. est sto pastcycleseaavg
. reg lseaavglcavfoia04avg2 pastyearseaavgwq lagseaavgflowfoia04avg3 elec food mill paper chem petro rubber leather metal transp secu just rnwhite mhhi carpl manuf popt popu MD PA plantdum*
Source | SS df MS Number of obs = 346
-------------+------------------------------ F( 80, 265) = 28.91
Model | 70.5846732 80 .882308415 Prob > F = 0.0000
Residual | 8.08787772 265 .030520293 R-squared = 0.8972
-------------+------------------------------ Adj R-squared = 0.8662
Total | 78.6725509 345 .22803638 Root MSE = .1747
------------------------------------------------------------------------------
lseaavglca~2 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
pastyearse~q | .0269644 .0052941 5.09 0.000 .0165406 .0373882
lagseaavgf~3 | .0002167 .0000903 2.40 0.017 .0000388 .0003945
elec | .2291311 .1543947 1.48 0.139 -.0748654 .5331276
food | .6554963 .1628898 4.02 0.000 .3347734 .9762193
mill | -.5985282 .1453619 -4.12 0.000 -.8847395 -.312317
paper | 1.396273 .1409364 9.91 0.000 1.118775 1.673771
chem | .3446018 .1043396 3.30 0.001 .1391618 .5500418
petro | 1.46296 .1356102 10.79 0.000 1.19595 1.729971
rubber | .7579646 .1225678 6.18 0.000 .5166341 .9992952
leather | 1.125222 .1200233 9.38 0.000 .8889018 1.361543
metal | -.0049207 .1071482 -0.05 0.963 -.2158908 .2060494
transp | (dropped)
secu | .4065807 .1260881 3.22 0.001 .1583187 .6548427
just | .1975654 .1281164 1.54 0.124 -.0546901 .449821
rnwhite | -.0104925 .0025118 -4.18 0.000 -.0154382 -.0055468
mhhi | -.0357134 .0043545 -8.20 0.000 -.0442871 -.0271396
carpl | .031048 .0081612 3.80 0.000 .014979 .0471171
manuf | .005316 .003224 1.65 0.100 -.0010319 .0116638
popt | -.014479 .0036334 -3.98 0.000 -.0216331 -.0073249
popu | .0042528 .0012065 3.53 0.000 .0018773 .0066282
MD | .4075256 .0899222 4.53 0.000 .2304726 .5845785
PA | -.2626332 .1038091 -2.53 0.012 -.4670287 -.0582377
plantdum1 | (dropped)
plantdum2 | (dropped)
plantdum3 | .7547777 .2169271 3.48 0.001 .3276577 1.181898
plantdum4 | .3212286 .1861813 1.73 0.086 -.0453543 .6878114
plantdum5 | -.1271638 .1443408 -0.88 0.379 -.4113646 .1570369
plantdum6 | .3403982 .1197871 2.84 0.005 .1045426 .5762538
plantdum7 | -.1881844 .1341801 -1.40 0.162 -.4523791 .0760103
plantdum8 | .2765308 .1264072 2.19 0.030 .0276406 .525421
plantdum9 | .6244376 .133818 4.67 0.000 .3609558 .8879193
plantdum10 | .1104249 .1228177 0.90 0.369 -.1313979 .3522476
plantdum11 | .4486392 .1109964 4.04 0.000 .2300921 .6671863
plantdum12 | -.9399541 .1363693 -6.89 0.000 -1.208459 -.6714489
plantdum13 | (dropped)
plantdum14 | (dropped)
plantdum15 | -.2710499 .1127303 -2.40 0.017 -.4930108 -.0490889
plantdum16 | -.3014505 .0988424 -3.05 0.003 -.4960669 -.1068341
plantdum17 | 1.137629 .1706129 6.67 0.000 .8016999 1.473559
plantdum18 | .1402687 .1380189 1.02 0.310 -.1314844 .4120218
plantdum19 | .7027639 .1482823 4.74 0.000 .4108025 .9947252
plantdum20 | -.2282995 .1282681 -1.78 0.076 -.4808539 .0242548
plantdum21 | -.6172346 .110944 -5.56 0.000 -.8356784 -.3987907
plantdum22 | .8857652 .1391707 6.36 0.000 .6117442 1.159786
plantdum23 | (dropped)
plantdum24 | (dropped)
plantdum25 | .2801356 .1456759 1.92 0.056 -.0066939 .566965
plantdum26 | (dropped)
plantdum27 | (dropped)
plantdum28 | (dropped)
plantdum29 | (dropped)
plantdum30 | -.4781219 .1486349 -3.22 0.001 -.7707776 -.1854662
plantdum31 | -.411771 .1386352 -2.97 0.003 -.6847377 -.1388044
plantdum32 | (dropped)
plantdum33 | (dropped)
plantdum34 | (dropped)
plantdum35 | (dropped)
plantdum36 | 1.680021 .1984655 8.47 0.000 1.289251 2.070791
plantdum37 | (dropped)
plantdum38 | (dropped)
plantdum39 | .9802748 .1835777 5.34 0.000 .6188184 1.341731
plantdum40 | (dropped)
plantdum41 | -.3939802 .2017067 -1.95 0.052 -.7911319 .0031715
plantdum42 | (dropped)
plantdum43 | (dropped)
plantdum44 | .3051018 .1509454 2.02 0.044 .007897 .6023066
plantdum45 | (dropped)
plantdum46 | 1.082839 .2263698 4.78 0.000 .6371268 1.528551
plantdum47 | (dropped)
plantdum48 | (dropped)
plantdum49 | (dropped)
plantdum50 | (dropped)
plantdum51 | (dropped)
plantdum52 | (dropped)
plantdum53 | (dropped)
plantdum54 | (dropped)
plantdum55 | (dropped)
plantdum56 | (dropped)
plantdum57 | -1.489521 .1759472 -8.47 0.000 -1.835954 -1.143089
plantdum58 | (dropped)
plantdum59 | (dropped)
plantdum60 | (dropped)
plantdum61 | (dropped)
plantdum62 | .6175411 .1563882 3.95 0.000 .3096196 .9254626
plantdum63 | (dropped)
plantdum64 | (dropped)
plantdum65 | .3256151 .1236991 2.63 0.009 .082057 .5691732
plantdum66 | .4430517 .167361 2.65 0.009 .1135252 .7725781
plantdum67 | .4104908 .1198253 3.43 0.001 .1745601 .6464215
plantdum68 | .082181 .1178579 0.70 0.486 -.149876 .3142379
plantdum69 | -.0220907 .1741656 -0.13 0.899 -.3650151 .3208338
plantdum70 | -.06986 .1333793 -0.52 0.601 -.332478 .1927581
plantdum71 | -.3387496 .1761595 -1.92 0.056 -.6855999 .0081007
plantdum72 | .3469106 .1149969 3.02 0.003 .1204868 .5733344
plantdum73 | -.9062246 .1091207 -8.30 0.000 -1.121079 -.6913707
plantdum74 | .2367819 .1386847 1.71 0.089 -.0362821 .509846
plantdum75 | .8494359 .1311289 6.48 0.000 .5912489 1.107623
plantdum76 | (dropped)
plantdum77 | -1.285866 .15225 -8.45 0.000 -1.58564 -.9860927
plantdum78 | -.8213171 .1576954 -5.21 0.000 -1.131812 -.5108218
plantdum79 | (dropped)
plantdum80 | (dropped)
plantdum81 | .474962 .135178 3.51 0.001 .2088023 .7411216
plantdum82 | .3443877 .1432406 2.40 0.017 .0623531 .6264222
plantdum83 | (dropped)
plantdum84 | .1847194 .1246186 1.48 0.139 -.0606491 .4300879
plantdum85 | .2492722 .0988171 2.52 0.012 .0547056 .4438388
plantdum86 | .5855041 .1971038 2.97 0.003 .1974153 .9735929
plantdum87 | .20296 .1808852 1.12 0.263 -.153195 .5591149
plantdum88 | .4355955 .1339749 3.25 0.001 .1718047 .6993863
plantdum89 | -.4653734 .126867 -3.67 0.000 -.715169 -.2155777
plantdum90 | .3904466 .1191348 3.28 0.001 .1558754 .6250178
plantdum91 | .320945 .1304105 2.46 0.014 .0641723 .5777176
plantdum92 | .0291285 .125904 0.23 0.817 -.2187709 .277028
plantdum93 | .3820168 .1428712 2.67 0.008 .1007098 .6633239
plantdum94 | -.3136678 .1168239 -2.68 0.008 -.5436889 -.0836467
plantdum95 | .0405165 .1321002 0.31 0.759 -.2195831 .300616
plantdum96 | 1.319497 .177426 7.44 0.000 .9701529 1.668841
plantdum97 | .372235 .1545219 2.41 0.017 .0679882 .6764819
plantdum98 | .597984 .1409842 4.24 0.000 .3203923 .8755758
plantdum99 | (dropped)
plantdum100 | -.286517 .1139464 -2.51 0.013 -.5108725 -.0621615
_cons | 3.342083 .2582654 12.94 0.000 2.83357 3.850596
------------------------------------------------------------------------------
. est sto pastyearseaavg
. suest pastcycleseaavg pastyearseaavg, cluster(npid)
matrix not positive definite
r(506);
________________________________________
From: [email protected] [[email protected]] On Behalf Of Christopher Baum [[email protected]]
Sent: Saturday, February 26, 2011 10:15 AM
To: [email protected]
Subject: re:RE: st: FW: comparing xtregar coefficients across models
<>
Sorry, forgot to mention that I also reversed the order of running the two models i.e.-
Run model 2.
Save the beta in a scalar as:
. scalar b_pastyearseaavgwq=_b[pastyearseaavgwq]
Run model 1.
Run test as:
. test _b[lagseaavgwqfoia04avg3]=b_pastyearseaavgwq
The test statistic shows that the two coefficients are not significantly different from each other, in both cases. So, can I conclude then that the coefficients are not statistically different?
NO. You cannot test whether two random variables are equal to one another by setting one of them to a fixed value, no matter how you do it.
suest is quite restrictive in terms of what models can be employed (e.g., xtreg does not work either). If you can fit the models with explicit dummies (using i.panelvar regressors), estimate each model with -regress- and then use suest. But the logic of comparing an estimated coefficient to a fixed value does not correspond to testing whether these two estimated coefficients can be distinguished from each other by the data.
Kit Baum | Boston College Economics & DIW Berlin | http://ideas.repec.org/e/pba1.html
An Introduction to Stata Programming | http://www.stata-press.com/books/isp.html
An Introduction to Modern Econometrics Using Stata | http://www.stata-press.com/books/imeus.html
*
* 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/
*
* 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/