Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • heterogeneity over time

    Hello,

    I am writing my thesis and I am encountering a problem. I hoped this forum could help me.

    I have a panel dataset with a cross sectional dimension of 1200 and a time dimension of 12 years (annual data). One of my explanatory variables is the same for all cross sectional units within a year.

    In my regression I would like to control for unobserved heterogeneity over time. There is some rational that tells that this might be present. I tried to include time fixed effects in my regression (with i.year as independent variable), but this results in ommiting at least one extra dummy variable (in addition to dropping one dummy to avoid the dummy trap) because of collinearity. And I was told that if this the case, I cannot draw conclusions from the coefficent estimates (something I clearly need to do).

    Is this because with a cross sectionally invariant variable estimating time fixed effects is not possible? A solution might be dropping the cross sectional invariant variable but this is my most important variable so that is not a solution.

    Is there another way for controling for unobserved heterogeneity when one of the explanatory varaibles is cross sectionally invariant?

    Kind regards,

    Daniel Kiory



  • #2
    Daniel:
    welcome to the list.
    I'm not sure I got your query right but, by definition, fixed effect machinery controls for both observed and unobserved heterogeneity across time, provided that it is refers to time invariant predictors.
    The unexpected omission was probably due to collinearity with the fixed effects.
    As a closing-out remark, your chances of getting helpful replies are conditional on posting what you typed and what Stata gave you back (as per FAQ). Thanks.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Hi Carlo,

      This looks like a problem I encounterd before, maybe this helps you as well Daniel

      On this site I found some useful insights http://www.reed.edu/economics/parker...es/Notes13.pdf
      page 2 and 3. It is under the header OLS but later, when they talk about fixed effects they refer back.

      I performed a regression with xtreg y1 x1 x2 x3 xn, fe. These are cross sectional fixed effects right? And with this the intercepts are allowed to vary cross sectionally but not over time? To allow the intercept to vary over time i think you need time dummies (by adding i.year to the equation), intead of only ,fe.

      But then comes the fact that there are cross sectional invariant variables (so they only vary over years, not between cross sectional units). I think this fact results in that time fixed effects are not allowed?

      Afterl all I decided I did not really needed the time fixed effects anymore, so I just took the ,fe option. I don't know wheter this is an option for you?
      Last edited by Rick Last; 29 May 2017, 08:30. Reason: add weblink

      Comment


      • #4
        Hello,

        Thanks for your replies.

        I think I really need the time fixed effects. I did Chow tests for the intercept of panel regressions of different subperiods in my dataset. This tells me the intercepts are not equal in the different subperiods. I think this is in indication for heterogeneity over time (otherwise the intercepst would not vary that much right?)

        Anyone with any help how i can take heterogeneity over time into account in my panel regression without introducing time fixed effects (by i.year)?

        Or can it be an solution to use a few year dummies? Again, if i use i.year some year dummies become ommited. But if I plug in a few year dummies manually I get an estimation output without omitted dumies (But i am not sure if I can draw conclusions out of this outcome with only a few dummies, it feels a bit random to introduce some year dummies...?

        Comment


        • #5
          Daniel:
          your chances of getting helpful replies are conditional on posting what you typed and what Stata gave you back (as per FAQ). Thanks
          Kind regards,
          Carlo
          (Stata 19.0)

          Comment


          • #6
            Hi Carlo,

            I hope this helps

            What i dit:
            xtset bankid year
            xtreg y1 x1 x2 x3 x4 x5 x6 x7 x8, fe vce(robust) This is perfectly fine

            Then i included time fixed effects as well with:
            xtreg y1 x1 x2 x3 x4 x5 x6 x7 x8 i.year, fe vce(robust

            And I received the following message:
            note: 2015.year omitted because of collinearity
            note: 2016.year omitted because of collinearity

            I think because of the cross sectional invariant variables (These are x6,x7 and x8)

            Here is the output of -dataex-

            Code:
            * Example generated by -dataex-. To install: ssc install dataex
            clear
            input int(bankid year) double(x1 x2 x3 x4 x5 x6 x7 y1 x8)
            1 2003             5.963  .0036481328441287 20.25913453180548 .6645947788426836            28.802  2.27009497336112  2.806775956480934 -.0602100994152655  -.22
            1 2004             8.336   .012462600269453 20.69008643824859 .8456279971431486 37.29000000000001  2.67723669309173  3.785742849694444   .108966657481826  1.03
            1 2005             8.516  .0033503382900973 20.73715394910658 .7489690721649485            38.548  3.39274684549547  3.345216063348772 -.0479100568873445  2.12
            1 2006 8.140999999999998  .0076815731988146 20.88826319260716 .6604314408255128            35.329  3.22594410070408  2.666625826122001  .0258923150430901  1.08
            1 2007             8.063  .0115381680360186 21.00005479426356 .6156421734541616            37.029  2.85267248150136  1.778570239652893  .0308507757204755 -2.11
            1 2008             7.374  .0122049787396655 21.28073188727943 .5623667871374294            37.037    3.839100296651 -.2916214586939532  .0529375115416313 -2.92
            1 2009             7.884  .0064275169191899  21.2104239824922 .5528974018003273            32.929 -.355546266299721 -2.775529574168075  .0730874302748639  -.09
            1 2010             7.563  .0073325043435949 21.21283983612652 .6536347956304903            32.599  1.64004344238988  2.531920616163149                  0   .08
            1 2011             7.228  .0096591058830451 21.31751932458168 .6972567083225446            32.018  3.15684156862221  1.601454672471391 -.0329582069428085  -.09
            1 2012             7.712   .009026438473062 21.36341985811395 .7277154704589096            32.093   2.0693372652606  2.224030853857144  .0258852079876792   .05
            1 2013 8.703999999999999  .0096210774826508 21.38876788802451 .6982590800378219            31.835  1.46483265562683   1.67733152992453  .0252320359397125  -.02
            1 2014             8.958  .0116609533854853 21.45321783396064 .6943412324883714            30.882  1.62222297740851  2.370457671463868 -.0912464672594471  -.01
            1 2015            10.226  .0101697316746515 21.37280485355159 .6704495972131505            37.886  .118627135552317  2.596148040509732   .115857484979558   .14
            1 2016 9.859000000000002  .0119708062745409 21.45698041962072 .6181959262851601            37.574  1.26158320570506                1.6  .0334032095535086   .35
            2 2003             9.388  .0231939122104163 19.33886568068722  .604131455399061            74.071  2.27009497336112  2.806775956480934 -.0203782647881545  -.22
            2 2004             9.473  .0234435510272523 19.71884310041392 .5974724388276419 75.62199999999999  2.67723669309173  3.785742849694444 -.0151588971737433  1.03
            2 2005 8.870000000000001   .022448778996112 19.81508711358248 .5951350484892202            72.076  3.39274684549547  3.345216063348772  .0064107235531035  2.12
            2 2006            10.101  .0236548313982612 19.80364707331288 .5945766218412886            71.387  3.22594410070408  2.666625826122001   .072399793133771  1.08
            2 2007             8.916  .0250507310539267 19.96368180121914  .599479930657421            64.908  2.85267248150136  1.778570239652893 -.0692097772963658 -2.11
            2 2008             7.728  .0177061135679187 20.10514820375927 .5517654974695024            63.099    3.839100296651 -.2916214586939532 -.0356626856024596 -2.92
            2 2009             9.296  .0097799828558069 20.22696422719652 .4963873879469184            64.586 -.355546266299721 -2.775529574168075  .0899011522108735  -.09
            2 2010             11.21  .0202783280604752  20.8206447844653 .5306214132514057 64.40700000000001  1.64004344238988  2.531920616163149  .0887123200350923   .08
            2 2011            10.718  .0149953097131577 20.87296950058107 .5643904922028042            62.276  3.15684156862221  1.601454672471391 -.0575273858186423  -.09
            2 2012            10.641  .0172554219149541 20.95922689197123 .5325417450358225            60.161   2.0693372652606  2.224030853857144  .0137941900338818   .05
            2 2013            10.035  .0199616941455228 21.04070086754754 .5289535763564339            56.521  1.46483265562683   1.67733152992453  .0319308908908345  -.02
            2 2014             9.487  .0205598427489808 21.15035152671303 .5356625151613762            53.823  1.62222297740851  2.370457671463868 -.0226012153485597  -.01
            2 2015 9.370000000000001  .0191559932775916  21.1998601995161 .5204586109272222            54.549  .118627135552317  2.596148040509732  .0113644581822099   .14
            2 2016             9.019  .0190260651442338 21.26978770097067 .5356935890351882             54.09  1.26158320570506                1.6  -.002404164603409   .35
            3 2003             7.948  .0213751474559754 20.24176854711861 .5379174509420365 56.09200000000001  2.27009497336112  2.806775956480934 -.0056156186487581  -.22
            3 2004             6.958  .0224311706962983   20.463969503562 .5437714087125705            49.088  2.67723669309173  3.785742849694444 -.0926567476681228  1.03
            3 2005             9.464  .0195767117731838  20.8023083122466 .5089682506848371            50.554  3.39274684549547  3.345216063348772  .0394574007767323  2.12
            3 2006             9.157  .0208544818223149 20.90235199380737 .5088515478510686            53.046  3.22594410070408  2.666625826122001  .0386943211318398  1.08
            3 2007             8.263  .0192668009077328 20.99542369340383 .5883567071573318            50.988  2.85267248150136  1.778570239652893 -.0150499149471925 -2.11
            3 2008             9.035  .0125396195186472 21.10871659958768 .5620814490634761 47.69200000000001    3.839100296651 -.2916214586939532  .0530886810089233 -2.92
            3 2009            11.376  .0056078435967122 21.10527222771892 .4781115728845097            49.947 -.355546266299721 -2.775529574168075  .1366179994669876  -.09
            3 2010            12.131   .004942880139342 21.11684610395581 .5861173178333585            48.151  1.64004344238988  2.531920616163149  .0491515300493517   .08
            3 2011            12.189  .0083329239578801 21.10112491561719 .6424192848946257             49.82  3.15684156862221  1.601454672471391  .0564538845386311  -.09
            3 2012            12.041  .0092584109893314  21.1112981279787 .6490423599429075 50.12900000000001   2.0693372652606  2.224030853857144 -.0247893427860313   .05
            3 2013            12.466  .0122139619043324 21.08353551209006 .6061077162251605             53.87  1.46483265562683   1.67733152992453 -.0593875522784044  -.02
            3 2014            12.856  .0173883809624779 21.17694507032958 .6147201579510242            53.706  1.62222297740851  2.370457671463868  .0515171275685895  -.01
            3 2015            12.293  .0159736432345484 21.21753820847438  .546345236560526            52.935  .118627135552317  2.596148040509732 -.0653661114168616   .14
            3 2016            12.293  .0171499507413203 21.24056446554048 .5187672400098204            52.412  1.26158320570506                1.6  .0766447123084171   .35
            4 2003 7.893999999999999  .0194154120110051  20.1821923235727 .5288835761147559            54.749  2.27009497336112  2.806775956480934 -.0014932507851757  -.22
            4 2004             7.795  .0191420026351819 20.35874447594636 .5877168040943986            53.818  2.67723669309173  3.785742849694444 -.0037429115605252  1.03
            4 2005             7.964   .018866022873055 20.37582951379534 .5865667081854715            54.116  3.39274684549547  3.345216063348772  .0028458896130421  2.12
            4 2006             7.175  .0176575413625252 20.74257520535553 .6062237009492123            55.363  3.22594410070408  2.666625826122001 -.0120378232957554  1.08
            4 2007             7.934  .0122481969049443 20.94778044792861 .7296600954947289            54.096  2.85267248150136  1.778570239652893  .0688737771287546 -2.11
            4 2008              6.63  .0003251538888645 20.92787060198083 .8053431323865329            44.413    3.839100296651 -.2916214586939532  .1228446882392067 -2.92
            4 2009            10.151 -.0147509453644543 20.87285843017653 .6264715168463308            40.011 -.355546266299721 -2.775529574168075 -.0093540178935143  -.09
            4 2010            11.086 -.0067687824888213 20.86675387228537 .5775078606193738 37.95399999999999  1.64004344238988  2.531920616163149  .1206480563255359   .08
            4 2011            11.822  .0088625678229011 20.97686720374436  .594343496560928 44.12900000000001  3.15684156862221  1.601454672471391 -.0493309083013167  -.09
            4 2012            11.287  .0103246943719746 20.99588579310353 .5785946315609506            44.085   2.0693372652606  2.224030853857144  .0118520078864637   .05
            4 2013            11.011   .011738227700451 21.02095789193751 .5486931708768797            43.858  1.46483265562683   1.67733152992453 -.0477268628408849  -.02
            4 2014            10.888  .0150414294592823 21.02813093205369 .6294909653378331            42.931  1.62222297740851  2.370457671463868 -.0546741448865626  -.01
            4 2015            11.178  .0121066731935461 20.98547701277336 .5447593818984547            44.323  .118627135552317  2.596148040509732  .0447016546070351   .14
            4 2016             10.73  .0153377324682778 21.02306001085153  .539524742229942            43.323  1.26158320570506                1.6 -.0767810233994686   .35
            5 2003             9.566  .0285695480969384 19.05809875352391 .3896280727127675            60.651  2.27009497336112  2.806775956480934   .002411744752417  -.22
            5 2004             9.703  .0287817579967757 19.08561689931111 .4147008742387477            63.134  2.67723669309173  3.785742849694444   .007200530345326  1.03
            5 2005             9.675  .0304487521533879 19.15721020669717 .4120910527420939            64.202  3.39274684549547  3.345216063348772 -.0160721763317389  2.12
            5 2006 9.466000000000001  .0298260556780974 19.19909844792861 .4256459030704669            64.811  3.22594410070408  2.666625826122001  .0064599012339959  1.08
            5 2007 9.107999999999999  .0301654262406729 19.26551630250386  .458436286319391            65.506  2.85267248150136  1.778570239652893 -.0310631366281027 -2.11
            5 2008             8.093  .0258089569816619 19.38299817179928 .4485081711900881            68.928    3.839100296651 -.2916214586939532  .0066202755282494 -2.92
            5 2009             9.489  .0181571856330944  19.4372732857812 .4635979462632746 67.24100000000001 -.355546266299721 -2.775529574168075  .0514411978019425  -.09
            5 2010            10.199  .0110458453846937 19.52679662347016 .4919073479096381            63.462  1.64004344238988  2.531920616163149  .0919990397636123   .08
            5 2011             10.49  .0138272093734119 19.61602889262934 .4995505303893327            61.785  3.15684156862221  1.601454672471391  .0071204409792922  -.09
            5 2012            11.471  .0199905885787613 19.65931179998429 .4992580165768756            63.718   2.0693372652606  2.224030853857144  .0175823965171844   .05
            5 2013            10.936   .022243993699288 19.70294225767275 .4985785299115594            64.553  1.46483265562683   1.67733152992453  -.022561376583027  -.02
            5 2014            10.376  .0221953706736249 19.80441773528796  .515191610794585            62.015  1.62222297740851  2.370457671463868  .1826289161517436  -.01
            5 2015            10.311  .0201697004824264 19.84969505892767  .526881600090416            62.075  .118627135552317  2.596148040509732 -.0283166232353746   .14
            5 2016            10.464   .019476930475397 19.90457832430559 .5360339053502449 61.99800000000001  1.26158320570506                1.6  .0359504137265012   .35
            6 2003             9.066  .0272948093926552 17.94298191848482  .595996474108798            54.147  2.27009497336112  2.806775956480934 -.0064008866822833  -.22
            6 2004             8.259  .0235509980378226 18.11699346885201 .6706471302208276            58.016  2.67723669309173  3.785742849694444 -.0887278213857665  1.03
            6 2005             7.593  .0175500156383018 18.23286431395641 .6501204848165154            58.833  3.39274684549547  3.345216063348772  -.022073167093724  2.12
            6 2006 7.499000000000001  .0148266189659159 18.31690174370617 .6419334918790028 55.09500000000001  3.22594410070408  2.666625826122001 -.0266561830566543  1.08
            6 2007            10.118  .0140890225869058  18.6420810887646 .6175177799812444              54.1  2.85267248150136  1.778570239652893 -.0756481733397156 -2.11
            6 2008 7.278000000000001  .0131151464932656 18.76269086812889 .6177282183971949            53.001    3.839100296651 -.2916214586939532  .0044050606005235 -2.92
            6 2009            12.227  .0077417509785214 19.37738320636002 .5713636498181891            59.608 -.355546266299721 -2.775529574168075  .3103752587065762  -.09
            6 2010            13.151  .0083306144901187 19.36318000030507 .5688024215710362            58.167  1.64004344238988  2.531920616163149  .0441277724446536   .08
            6 2011            13.427  .0132207277336808 19.38884092840306 .6224619701978982            59.921  3.15684156862221  1.601454672471391 -.0434834674341551  -.09
            6 2012            13.019  .0148735883910694 19.50257536793012 .6647759605689831            62.944   2.0693372652606  2.224030853857144 -.0142714999119078   .05
            6 2013            12.356   .012506935396525 19.55208181673325 .6122357426327967 62.79200000000001  1.46483265562683   1.67733152992453  .0071612092036122  -.02
            6 2014            11.713  .0158516003361784 19.62982022299776 .6370093579896439            60.829  1.62222297740851  2.370457671463868 -.0390245674672607  -.01
            6 2015            11.258  .0141325099624317 19.66854917658296 .6492862359466963            58.988  .118627135552317  2.596148040509732 -.0611913699120832   .14
            6 2016            11.063  .0130573707628898 19.69044054162502 .6447939568022277             59.18  1.26158320570506                1.6 -.0313934637820483   .35
            7 2003             8.615  .0224253263691915 16.73405979774359 .5255398521036802            69.584  2.27009497336112  2.806775956480934 -.0227782986227343  -.22
            7 2004 8.802000000000001  .0216840851730177 16.91815018520505 .5421276007414967 70.02199999999999  2.67723669309173  3.785742849694444 -.0026619674040962  1.03
            7 2005            18.619  .0201784879943377 17.20691881544543  .592447891971855            54.512  3.39274684549547  3.345216063348772  .0813618360199198  2.12
            7 2006            18.101   .001465341091531 17.24312118490015 .6664871347782079            53.182  3.22594410070408  2.666625826122001  .0318411814650528  1.08
            7 2007            20.592  .0128277952553578 18.39554652937019 .5403261784580714            58.882  2.85267248150136  1.778570239652893  .0052228255444451 -2.11
            7 2008            17.397  .0119913367291269 18.56167936480364 .5609168282322876            58.349    3.839100296651 -.2916214586939532 -.0227511735590769 -2.92
            7 2009            18.416 -.0085782370903706 18.66252863338943 .6653110821653536            53.398 -.355546266299721 -2.775529574168075 -.0215468119367936  -.09
            7 2010            19.092  .0016076313415247 18.65892001931617 .6979048757613933            54.789  1.64004344238988  2.531920616163149  .0721621677592426   .08
            7 2011            18.503  .0117302993318901 18.70944543016633 .7244047992659485 57.12200000000001  3.15684156862221  1.601454672471391  -.014379986275419  -.09
            7 2012            14.601  .0124241971096908 19.34080913060049 .6848620991084349            55.431   2.0693372652606  2.224030853857144  .1826866153328095   .05
            7 2013            14.115  .0084660677325186 19.28980818018855 .6852943839217404 55.81399999999999  1.46483265562683   1.67733152992453  -.068942522651366  -.02
            7 2014            13.566  .0114415329806682 19.35681809823333  .705484897847973            54.564  1.62222297740851  2.370457671463868 -.0178809506937561  -.01
            7 2015            13.139  .0089638487630617 19.42583036711011 .7225530867078261 55.13200000000001  .118627135552317  2.596148040509732 -.0455236943976236   .14
            7 2016            12.129   .007500116952063 19.47178316851703 .7071539428420449 54.84999999999999  1.26158320570506                1.6 -.0877058683811818   .35
            8 2003            10.205  .0204077529888201 17.09038800562536 .5102801256302361             61.31  2.27009497336112  2.806775956480934  -.055502454548062  -.22
            8 2004            11.726  .0209373416815479 17.17083201493312 .5748571876455211             64.42  2.67723669309173  3.785742849694444  .0776814123274683  1.03
            end
            Please let me know I my post is still not clear enough

            Kind regards,

            Daniel

            Comment


            • #7
              And I received the following message:
              note: 2015.year omitted because of collinearity
              note: 2016.year omitted because of collinearity

              I think because of the cross sectional invariant variables (These are x6,x7 and x8)
              That's exactly right. If you omit x6-x8 from the regression model, Stata does not omit any years other than the normal base year. This is a matter of exactly colinearity and there is no way around it. Something has to be omitted: if it isn't those year indicators, then it must be x6-x8. There is no way to simultaneously estimate the effects of x6-x8 and estimate the effects of the complete set of year indicators. They are not separately identifiable.
              I tried to include time fixed effects in my regression (with i.year as independent variable), but this results in ommiting at least one extra dummy variable (in addition to dropping one dummy to avoid the dummy trap) because of collinearity. And I was told that if this the case, I cannot draw conclusions from the coefficent estimates (something I clearly need to do).
              What you were told is, in this situation, incorrect. The variables x6-x8, with which the full set of time indicators are co-linear, are, by virtue of being co-linear proxies for those year indicators, adjusting for year-specific shocks just as well as the year indicators themselves would. They contain exactly the same information.

              You just need to make a decision now, based on your research goals. As I understand them from #1, you included the year indicators, not because you are actually linterested in getting estimates of year-specific shocks, but because you want to adjust for their influence on the outcome. If that's correct, then you have no problem at all. Include x6-x8 (whose effects, presumably, you are interested in) and let Stata drop indicators for a few years: the adjustment is being taken care of implicitly by x6-x8. If, I have misunderstood and you really do specifically want to estimate each year's shock, then do the opposite and omit x6-x8.

              Comment


              • #8
                Thanks Clyde for your reply.

                Yes I want to adjust for their influence on the outcome, that is correct. I have still a question though.

                If if create dummies myself for every year, instead of using i.year. And do the following:

                xtreg y1 x1 x2 x3 x4 x5 x6 x7 x8 d2004 d2005 d2006 d2007 d2008 d2009 d2010 d2011 d2012 d2013 d2014 d2015 d2016, fe vce(robust)

                I get the same results as with i.year, which is pure logic since it is the same. (My sample begins in 2013 so i left d2013 out intentially because of the dummy trap). In this case d2015 and d2016 become ommited. So exactly the same as with i.year.

                So I thought 2 dummies will be left out every time, and I wanted to check this manually, but if i regress:

                xtreg y1 x1 x2 x3 x4 x5 x6 x7 x8 d2004 d2005 d2006 d2007 d2008 d2009 d2010 d2011 d2012 d2015 d2016, fe vce(robust, so that d2013 and d2014 are excluded), d2016 is still ommited by Stata again because of collinearity. So i miss practically 3 dummies instead of 2 in the previous examples. How is this possible?

                And another question:
                The regression estimates do depend on the omission of certain dummys right? I need to make conclusions about the regressions coefficients (x8 is the most important), so for me it feels quite random to omit 2015 and 2016. Why should I omit these? And not 2007 and 2009, or whatsoever?

                Last edited by Daniel Kiory; 29 May 2017, 14:19.

                Comment


                • #9
                  There is no contradiction between your two models. In the first, of your 13 time indicators, 3 are omitted and 10 are retained. In the second, you start with 11 time indicators, 1 is omitted and 10 are retained. No discrepancy here.

                  Yes, the estimates of your x6-x8 variables will change depending on which of the time indicators you choose to omit (or tell Stata to omit for you). And yes, the choice is arbitrary. There is really no way out of this. What I would probably do is rely on external information (theory, expert opinion) to identify some years that are "average" with respect to the outcome y1, and omit those. Those would, in a fully identified situation, have effects that are close to zero, so omitting them (which is tantamount to constraining them to zero) will probably give you the most usable estimates of the effects of x6, x7, and x8. But, at the end of the day, because these are firm-invariant and are really just proxies for time periods, you are quite limited in what you can do with them. Nevertheless, you have nothing to worry about with regard to your other variables: their coefficients can be taken at face value.

                  Comment


                  • #10
                    Thans for your reply Clyde

                    I have still a question though. I compared the following models:

                    xtreg y1 x1 x2 x3 x4 x5 x6 x7 x8 i.year, fe
                    xtreg y1 x1 x2 x3 x4 x5 x6 x7 x8 i.year,

                    And it turns out that the first one leads to the omission of 2-year dummies, and the second one leads to the omission of 3 year dummies. This should have something to do with the cross sectional fixed effects I guess (,fe)?

                    And to check whether the period dummies are significant (although economic theory tells me they are anyway) I used the command .testparm and the p-value is 0.000. This indicates that the dummies are significant right from a statistical point of view?

                    Comment


                    • #11
                      Daniel:
                      i will aswer to your second query, since according to the excerpt you posted, both models omit three years.
                      Yes, if -testparm- reaches statistical significance, time dummies are worth including in your model(s).
                      Kind regards,
                      Carlo
                      (Stata 19.0)

                      Comment


                      • #12
                        Thankyou,

                        I think I made a mistake in my prevous post by stating xtreg y1 x1 x2 x3 x4 x5 x6 x7 x8 i.year, this will yields random effect because the default setting of xtreg is random effects.

                        To summarize
                        regress y1 x1 x2 x3 x4 x5 x6 x7 x8 i.year will give me time fixed effects (one-way fixed effects model)
                        xtreg y1 x1 x2 x3 x4 x5 x6 x7 x8, fe will give me cross sectional fixed effects (one-way fixed effects model)
                        xtreg y1 x1 x2 x3 x4 x5 x6 x7 x8 i.year, fe will give me time- and cross sectional fixed effects (two-way fixed effects model)
                        Is this correct?

                        Online and in literature the most times if they refer to a one-way fixed effects model they talk about cross sectional fixed effects. I am doubting if I can include only time fixed effects or that I should include both.

                        Besides, I also want to analyse subperiod. Instead of 2003-2016 I want to analyze 2003-2007 and 2009-2016. This represents a pre-and post-crisis period. Maybe a rough cut, but this periods are the best I can do with annual data.

                        Then I encouter the folliwing problem, with a 2003-2007 period, the number of i.year dummies is very small. Only one of the dummies is not omitted. I don't think this makes a lot of sense. So what I am planning to do:

                        The whole period 2003-2016 I will include time dummies to control for heterogeneity over time. This makes sence because this period is chacacterized by a boom (2003-2006), crisis (2007-2008), and recovery (2009-2016). I think the sub periods contain less heterogeneity over time because the environments where a kind of the same (or a boom, or a crisis, or a recovery)

                        The sub periods are to small to include the time dummies, I think I will analyze these periods without the time fixed effects, and only use the cross sectional fixed effects.

                        Maybe this is too much to ask, but do you think this make sense? Of do you think this different estimattion methods do not make sense and I have to search for an estimation method that i can use in every period.

                        Kind regards

                        Comment


                        • #13
                          Daniel:
                          I'm under time constraints.
                          Hence, I will reply to your first question only:
                          -using -regress- for panel data requires that you -cluster- your standard errors on your -panelid-; otherwise, Stata will treat your observations as independent (which is not the case due to the panel structure of your dataset).
                          Last edited by Carlo Lazzaro; 30 May 2017, 02:11.
                          Kind regards,
                          Carlo
                          (Stata 19.0)

                          Comment


                          • #14
                            In general, when you have panel data you should use panel-estimators. While Carlo is correct that using -vce(cluster panelvar)- can correct the standard errors, that does nothing about the omitted variable bias that arises from failing to use a panel estimator. To determine whether it is permissible to use OLS instead of a panel estimator, you should scrutinize the results that you see at the very bottom of the output from -xtreg, fe- or -xtreg, re-. With -xtreg, fe- you will see a single line containing an F test of whether all u_i are zero. If that F-test is not statistically significant, then you can consider going to OLS. With -xtreg, re-, you need to look at the line for the variance of sigma_u. If sigma_u is sufficiently close to zero (meaning that it is very small in comparison to sigma_e and all of the coeffficients (other than the constant term) in the fixed effects, then you can consider using OLS. Otherwise, you need to use a panel estimator.

                            Then I encouter the folliwing problem, with a 2003-2007 period, the number of i.year dummies is very small. Only one of the dummies is not omitted. I don't think this makes a lot of sense.
                            It's exactly the same situation as before. When you are working with the 2003-2007 time period you have five years. You lose one time indicator automatically. Then you have your three variables x6-x which are colinear with the time variables. So you are left with 1 time indicator. What doesn't make sense about that?

                            Comment


                            • #15
                              I agree with Clyde.
                              I would only add that, to the best of my knowledge/experience is quite unfrequent that real-world panel datasets can be handled with -regress- fruitfully.
                              Last edited by Carlo Lazzaro; 30 May 2017, 10:38.
                              Kind regards,
                              Carlo
                              (Stata 19.0)

                              Comment

                              Working...
                              X