Announcement

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

  • Panel data - industry, company, year fixed effects

    Dear members of the community,
    I am an inexperienced user and I'm getting an error when trying to use fixed effects.

    I am running research of 491 companies that in total had 1329 deals (rows in total) within 196 industries over 10 years (2010-2020). The dependent variable is CAR [-2;2] for each deal, independent ones are dummy var of ownership and dummy var of management. Control variables include dummies for cross-industry, cross-border etc, and different data of companies and deal financials.
    The SATA gives an error, for example, "option i.company not allowed (r198)" (same for i.year and i.industry) when applying fixed effects.
    The goal is to obtain results that include industry, company, and year fixed effects. How that can be done?
    Any help and advice would be very appreciated, thank you!

  • #2
    Your question really isn't clear without more detail, or at a minimum it is too difficult to guess at a good answer from what you have shared. Please help us help you.
    • Show example data.
    • Show the command you ran that produced the error message.
    The Statalist FAQ provides advice on effectively posing your questions, posting data, and sharing Stata output.

    To present example data, be sure to use the dataex command to do this. If you are running version 17, 16 or a fully updated version 15.1 or 14.2, dataex is already part of your official Stata installation. If not, run ssc install dataex to get it. Either way, run help dataex and read the simple instructions for using it. dataex includes complete information about aspects of the data that are often critical to answering your question but cannot be seen from tabular displays or screenshots. It also makes it possible for those who want to help you to create a faithful representation of your example to try out their code, which in turn makes it more likely that their answer will actually work in your data.

    When asking for help with code, always show example data.

    Comment


    • #3
      Originally posted by Arturs Dudums View Post
      Dear members of the community,
      I am an inexperienced user and I'm getting an error when trying to use fixed effects.

      I am running research of 491 companies that in total had 1329 deals (rows in total) within 196 industries over 10 years (2010-2020). The dependent variable is CAR [-2;2] for each deal, independent ones are dummy var of ownership and dummy var of management. Control variables include dummies for cross-industry, cross-border etc, and different data of companies and deal financials.
      The SATA gives an error, for example, "option i.company not allowed (r198)" (same for i.year and i.industry) when applying fixed effects.
      The goal is to obtain results that include industry, company, and year fixed effects. How that can be done?
      Any help and advice would be very appreciated, thank you!
      William is entirely right.

      I presume you have entered i.company after the comma, which causes Stata to consider it as an option. That will of course be invalid.

      Have you xtset your data?

      Without a lot more details, we cannot help you more than that.

      Comment


      • #4
        Arturs:
        William and Maxence gave helpful hints.
        As an aside, please note that the -fe- estimator will wipe out al- time-invariant variables.
        In addition, as Maxence wisely surmised, the suspect that you have -xtset- your data with -company- as your -panelvar- and that you try to plug the very same variable in the right-habd side of your -xtreg,fe- equation legally creeps up.
        Please note that this coding is unhelpful (and will take forever before proving its unusefulness) if you have already -xtset- your data with this -panelvar-.
        No need to say that William's wise recall about sharing what you typed and what Stata gave you back as always applies.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Dear all,
          Thank you for your responses and feedback.

          Hereby I've provided an extract from the data set.

          Code:
          * Example generated by -dataex-. For more info, type help dataex
          clear
          input int(year industry company) long deal_id double car22 byte(fam_own ceo cross_border cross_industry target_listed) double(log_deal ret_assets log_size cash_hold long_lev short_lev) byte(deal_act cash stock other success) int age
          2010 9319  1     535959  -.011514979393426212 1 0 0 0 0 17.858561825798823   .05196605164394367 21.077429229578936   .06568265838028109    .2611502693356014     .03778207255078639  1 1 0 0 1  21
          2016 3250  2 1909515149  -.006441664475699034 1 1 1 1 0 18.851278367879285    .4403561370037249 23.121797270987667   .13555010447896793                    0     .02016898337421641  3 1 0 0 1  59
          2017 3250  2 1941015048  -.021818587408676073 1 1 1 1 0 17.385043254445645   .41925311203319504 23.212330496883077   .09626556016597511  .008132780082987552     .11269709543568465  3 0 0 1 1  60
          2010 3250  2     601200 -.0015214513422794783 1 1 1 0 0  16.88523465406974    .2724231115686527 22.773664693173515    .0612533779436366   .19958821258525286    .022133573542658602  3 1 0 0 1  53
          2011 6611  3 1601324084    .05553753981740486 1 0 0 0 0 20.100005568100325  .003752806794884311 25.352445475394855                    0   .00728888021087572  .00010250903055745387  8 1 0 0 1   6
          2011 6611  3 1601245108    .03940059288620967 1 0 1 0 0 21.532038424933916  .003752806794884311 25.352445475394855                    0   .00728888021087572  .00010250903055745387  8 0 1 0 0   6
          2017 6611  3 1909584907    .09115632081087603 1 0 1 1 0 20.163191668970907 .0008908595919027467 27.332588125572624                    0 .0019286234130300008   .0007035230060109436  8 1 0 0 1  12
          2011 6611  3 1601317279    .06634803258352275 1 0 1 0 0 17.942644943009366  .003752806794884311 25.352445475394855                    0   .00728888021087572  .00010250903055745387  8 1 0 0 1   6
          2014 6611  3 1909104647  -.057967732205451566 1 0 1 1 0 21.502700744391063 .0007093923636281063 26.850129780872194                    0 .0020559059698129424   .0017375636902900802  8 1 0 0 1   9
          2018 6611  3 1941145109   .007162145498477753 1 0 0 1 0 19.866422563715677 .0009313682452073096 27.460050097358536                    0 .0019493478049370822   .0006703478452765986  8 1 0 0 1  13
          2019 6611  3 1941253774   .051002839047081056 1 0 0 1 0 23.826863355503068 .0011335766396109754 27.412430932283563                    0 .0021389881926358583   .0006831323547161641  8 0 1 0 1  14
          2012 6611  3     637766   .022660607522101205 1 0 0 1 0  19.67629678143014 .0022836845144568445 25.726715375227943                    0  .005347622309066247 2.6858976941568297e-06  8 1 0 0 1   7
          2018 3512  4 1941073854   .007633837218838551 1 0 0 1 0 21.113278840495653   .03294242527791309  23.34461733944274   .13009022632922068   .41978145016467583     .04515678733196164  3 0 0 1 1  17
          2010 3512  4 1601004676  -.019435244388637765 1 0 1 1 0 20.512544805630757  .048661924119241196 22.498895924244582  .061991869918699184    .4941226287262873 .000016937669376693767  3 0 0 1 1   9
          2018 3512  4 1941037572   .029376520526764944 1 0 0 1 0 21.113278840495653   .03294242527791309  23.34461733944274   .13009022632922068   .41978145016467583     .04515678733196164  3 0 0 1 1  17
          2010 3511  5 1601022229   .025470228344301925 0 0 1 0 0  19.08539274976489   .03505584908483989 26.206231218650967   .07945244202046067   .16625027540021367     .03235796623697305  7 0 0 1 1  64
          2011 3511  5 1601261570   -.01327317827393239 0 0 0 0 0  21.16240295927744   .03638647084464432 26.168739479408746   .06975620071901151     .181215932190223     .03472057382815366  7 1 0 0 1  65
          2013 3511  5 1601390200   .056030646850950244 0 0 0 1 0 21.598734574300313   .03614861312845355  26.27156730283563   .07187277308110171   .16364811663505982     .04395621512377288  7 0 0 1 1  67
          2011 3511  5 1601313111   -.03702627763469528 0 0 1 0 0 20.479919578314682   .03638647084464432 26.168739479408746   .06975620071901151     .181215932190223     .03472057382815366  7 0 0 1 1  65
          2015 3511  5 1909200060  -.010614117948078313 0 0 1 1 0 21.428835537504913  .022416926877009833 26.354266126870893   .09869112106144311   .18887148178288599    .041223771335156895  7 0 0 1 1  69
          2016 3511  5 1909266969  -.004308534679717356 0 0 0 1 0  21.72205779033231  .025727879562562134 26.363895496597344   .10335179661979832   .18815509160630592     .04332836244851584  7 0 0 1 1  70
          2010 3511  5 1601193222    .03396360880355487 0 0 1 0 0 19.186148586091935   .03505584908483989 26.206231218650967   .07945244202046067   .16625027540021367     .03235796623697305  7 0 0 1 1  64
          2014  899  6 1909071067    .09298911439694918 0 0 1 1 0 20.875181114408203     .089886397167306  22.41380435881706    .1264569194452641    .2740483918560047    .012688108586603719  9 1 0 0 0 134
          2014  899  6 1909165597    .03393283442890393 0 0 1 1 0 20.139869520345584     .089886397167306  22.41380435881706    .1264569194452641    .2740483918560047    .012688108586603719  9 1 0 0 1 134
          2011  899  6 1633041420  -.003968093226503877 0 0 1 0 0  19.28940742966709    .0955532241142765  22.32394550770661    .0868775724316036   .20331288838673234     .08770478573157937  9 0 0 1 1 131
          2016  899  6 1909477182   .014478233311297288 0 0 1 1 0 16.195982189615393   .08430871605965184 22.630197529216286    .1216802329035708   .23542867328144496     .08876477927633535  9 0 0 1 1 136
          2014  899  6 1909079217    -.0321986294363696 0 0 1 1 0 20.926346058984635     .089886397167306  22.41380435881706    .1264569194452641    .2740483918560047    .012688108586603719  9 0 0 1 0 134
          2014  899  6 1909077162  -.005176193029242444 0 0 1 1 0  20.88202720263535     .089886397167306  22.41380435881706    .1264569194452641    .2740483918560047    .012688108586603719  9 1 0 0 0 134
          2016  899  6 1909446568   .005106019957439844 0 0 0 1 0 20.595432465436527   .08430871605965184 22.630197529216286    .1216802329035708   .23542867328144496     .08876477927633535  9 1 0 0 1 136
          2011  899  6 1601033210    .04366320816277673 0 0 0 1 0 19.282601579865993    .0955532241142765  22.32394550770661    .0868775724316036   .20331288838673234     .08770478573157937  9 0 0 1 1 131
          2010  899  6 1601207156   -.06804302795141916 0 0 1 1 0 17.809606147932755   .09160115659166893 22.210942812354904   .08089364778169332    .2262356555525436     .05075901328273244  9 0 0 1 1 130
          2010 6499  7 1601067497  -.013772277938227828 1 0 1 1 0  18.80282495490489   .07035792262591076  24.43104064416264                    0    .2679635944361308     .07045605083040993  1 0 0 1 1 102
          2011 6619  8 1601075552    .14110877509144948 1 1 0 0 1  16.53066877052586  .022732783334589814  20.01152485816193                    0    .1321586262120789      .2903284303437934  1 0 0 1 1  26
          2011 2660  9 1601223670   .018363626404245506 1 1 1 1 0 19.715407911546766   .11650804069576633 23.446861249384085   .12490974729241877    .2899245159172957    .007417131604857237  2 1 0 0 1  39
          2010 2660  9 1601085781    .06848580069135958 1 1 1 1 0 16.972196461573823   .15721937067618835  22.91625925331036    .1520865878152198   .08725730863646508     .01104664137469315  2 1 0 0 1  38
          2010 4299 10 1601090536   -.05728942847469766 0 0 0 1 0 18.940069598378845  .009882397291375725  20.97316737868415   .13196910348867008    .2513616725303159     .07668515981397292  1 0 0 1 1  36
          2011 6619 11 1601094385    .05856640012154868 0 0 0 0 0 17.383774844720236  .026923197785686935 22.087869394286333                    0 .0033097685308076732      .4882147458555081  7 1 0 0 1  28
          2018 6619 11 1941080971    .04522745469411023 0 0 0 1 0 17.884537312202085  .031528860687205354  22.96208661569404                    0    .2857478597110014                      0  7 1 0 0 1  35
          2017 6619 11 1941005826  -.013948687496618754 0 0 0 1 0 14.508657738524219   .03738278693552329 22.981884308760414                    0   .24834169448055607                      0  7 0 0 1 1  34
          2018 6619 11 1941031654  -.049248418510267476 0 0 0 0 0  16.11809565095832  .031528860687205354  22.96208661569404                    0    .2857478597110014                      0  7 0 0 1 1  35
          2016 6619 11 1909236477  -.003157754621254288 0 0 0 1 0 18.890684373198102   .01819489156692985 22.886490581915492                    0   .17190287091432546    .036923168886137656  7 0 0 1 1  33
          2019 6619 11 1941183003   -.05358272444085155 0 0 0 1 0 16.316946509703484  .023910167789851135 23.077116503943802                    0    .2892513830483381    .014276995758322421  7 0 0 1 1  36
          2011 6619 11 1601339665    -.0472268810108792 0 0 0 0 0 16.160771925238755  .026923197785686935 22.087869394286333                    0 .0033097685308076732      .4882147458555081  7 0 1 0 1  28
          2015 1105 12 1907120861   -.03422244839060963 0 0 1 1 0 20.356127340478793   .07501193190857507 24.353297215251143   .02227289600678793   .28175213448586733     .05141326828233547  6 1 0 0 1 142
          2010 1105 12 1601119158    .03784116864936486 0 0 1 0 0 22.212607866152997   .07811970319032732 24.002257919141595   .02361670872725903   .29330671588383744     .03744020490413952  6 0 0 1 1 137
          2011 1105 12 1601315359  .0046474574304583745 0 0 1 0 1 18.186223432737883    .0813580565488259 24.023795378807804  .030486231429940648   .29572013123456337    .043794005971909904  6 0 0 1 1 138
          2011 1105 12 1601258372  -.022435016608519223 0 0 1 0 0 17.912574087110077    .0813580565488259 24.023795378807804  .030486231429940648   .29572013123456337    .043794005971909904  6 0 0 1 1 138
          2015 1105 12 1909269127  .0012607040948365913 0 0 1 0 0 19.094127641978726   .07501193190857507 24.353297215251143   .02227289600678793   .28175213448586733     .05141326828233547  6 0 0 1 1 142
          2011 1105 12 1601258370  -.022435016608519223 0 0 1 0 0   17.8266316509165    .0813580565488259 24.023795378807804  .030486231429940648   .29572013123456337    .043794005971909904  6 0 0 1 1 138
          2016  729 13 1909524355   .019983570510341386 1 1 0 1 0  18.89397271068529   .04239613694417099 21.857380395457017   .06396915474742795    .1378996403317441      .1246694462138321  3 0 1 0 1  26
          2018  729 13 1941192825  -.039937499820689164 1 1 0 1 0 16.811242831518264   .06158616268092669  21.92953420444992  .062302715898322474   .15984105329132586     .01932598502122422  3 0 0 1 1  28
          2010  729 13 1601130852    .05287999667256921 1 1 0 1 0  18.75715298057358  .056927856350447476  21.68590375133886   .08035568692371292   .21463914809277496     .06848939984991953  3 0 0 1 1  20
          2012 2351 14 1601131626    .02395835363838019 0 0 0 0 0  20.16813995428384    .0690406247930444 22.164985444171712   .09799950803697292    .3977513978372548      .0787862231430761  1 0 0 1 1  21
          2010 7022 15 1601147748    .03916520575278115 0 0 1 1 0 14.808762330974558   .07206478386213658 20.021439097760144   .15149723914065352  .044661968733797484     .04972371232188574  1 0 0 1 1  41
          2010 2222 16 1601148506    .05301614032053138 1 0 1 1 0 17.948178956907228   .06713355017514147  19.84538779955867   .06657540705954809    .2590577966819354     .08684658762846914  1 0 0 1 1  38
          2018 4120 17 1941210845   -.05290086193315084 1 1 0 1 0 18.258161814454592    .0409930750492288  22.11201917230956    .1467422206527529   .39261712663422654     .06891308598231155  2 0 0 1 1  58
          2010 4120 17 1601148890    .06014244500345682 1 1 0 1 0  17.56536751280203  .010880894327681643 21.619909217468454   .17094055098371885   .20984628539003436     .14720761242428185  2 0 0 1 1  50
          2018 1032 18 1941041446   -.07561234985911787 1 0 1 0 0 17.161436215455925    .0608807913141326 21.429876477020823  .011786736677702088   .21089393811580928     .10948547907389292  3 0 0 1 1 165
          2017 1032 18 1909547503  -.001515450765119693 1 0 1 1 0 19.758337098076336  .052788655110713595 21.443535358840535  .004482753418878075    .2586872812334093     .07422480044885929  3 0 0 1 1 164
          2010 1032 18 1601149518   .028955008575515803 1 0 0 1 0 18.469470908121796   .06401378207965809 21.223494308715534  .018035920242459817    .2627048240917156     .07880307901652904  3 0 0 1 1 157
          2011 3250 19 1601272106   .020106410277323176 0 0 0 1 0 19.024996710805695   .09265171757499861  18.89879514180655  .038257192984631413     .161230727264837     .09292449613460382  7 0 0 1 1  44
          2011 3250 19 1601286885  .0017551837290615737 0 0 0 1 0 17.565014633894645   .14618091022585405 21.289828865396903  .024231074792872547 .0071501532175689475     .09153331063443423  7 0 0 1 1  44
          2018 3250 19 1941064753   -.03690163818790203 0 0 1 0 0 18.110539133741657   .10650224215246637 21.943977757276624    .0826351191881048    .1318149634175124     .02956101014869011  7 1 0 0 1  51
          2014 3250 19 1909159297  -.012819373936507448 0 0 0 1 0  16.11809565095832   .08788994380933927 21.671249015553055   .04638635923270684   .11846541367951947     .02460763417942259  7 0 0 1 1  47
          2016 3250 19 1909447292  -.036432642384373694 0 0 1 1 0  16.99356438831222   .09832276809297412 21.831432338419333   .05896724775488642   .12064183835182249    .029021394611727418  7 0 0 1 1  49
          2010 3250 19 1601150589   -.02700230250171197 0 0 1 1 0  15.60727002719233   .17505349623800648  21.09393243951188  .049285566369848835 .0051770552909505075     .02733485193621868  7 0 0 1 1  43
          2013 3250 19 1601298341   .039216055160748726 0 0 1 1 0 19.616986944833467   .11945734316671218  21.51017654731852   .19484658107985067    .1386688518619685     .04484202858963853  7 0 0 1 1  46
          2016 6120 20 1909451162   .011405035082464595 1 0 0 1 0 19.498986442356287   .05109074289102453 24.423999748507352  .006868097932159004   .19215850977098106     .07503026410060035  6 0 0 1 1  23
          2010 6120 20 1601203725   .005909419027491539 1 0 1 1 0 17.751753283699053    .1781069632638906    24.421328000635   .02343382298298199  .037380167950655206    .005251554410562561  6 1 0 0 1  17
          2010 6120 20 1601192409    -.0686889033484615 1 0 0 0 0 16.176673945179743    .1781069632638906    24.421328000635   .02343382298298199  .037380167950655206    .005251554410562561  6 0 0 1 1  17
          2015 6120 20 1909303998   -.02245029039612248 1 0 1 0 0  16.38638846066702   .08108108108108109  24.31091512265128 .0038451962709895155   .11975435005117707      .1373205344546184  6 0 0 1 1  22
          2018 6120 20 1941022035   -.05176320001146213 1 0 0 1 0 21.685307085558016   .05190939451139829 25.137808063296973  .004912637336043754     .263382701708533     .07775519093945114  6 0 1 0 1  25
          2010 6120 20 1601150691 -.0014219881099711233 1 0 1 1 0 17.489799587621988    .1781069632638906    24.421328000635   .02343382298298199  .037380167950655206    .005251554410562561  6 0 0 1 1  17
          2013 2351 21 1601485550  -.016077671028354647 1 0 0 0 0  17.50439001207821   .05699166486697724 21.165271145765285    .1264333240777877   .24032924032538386     .08616270220796182  2 0 0 1 1  85
          2010 2351 21 1601151174  -.007124145038236871 1 0 1 0 0 16.985196138641705  .056028703681364325 21.277623252413687   .10620327638322587   .22030167357719513     .08137305250048542  2 0 0 1 1  82
          2014 6619 22 1909064682    .08663089510422171 1 0 0 1 0 14.837533336470075   .03558310376492195 22.194820042017124    .5902203856749312   .04591368227731864      .5195133149678605  4 0 0 1 1  25
          2011 6619 22 1601242285   .049825865886292856 1 0 0 1 0 14.984777004085997 -.006142820578448937 22.086035653019344   .05323777834655746                    0    .061428205784489376  4 0 0 1 1  22
          2010 6499 22 1601153706    .13819574748612953 1 0 0 1 0 17.731392508078578 .0007486430844095078 22.399053129922045    .5530600786075238   .03799363653378252      .6889387984278496  4 1 0 0 1  21
          2011 6619 22 1601269390 -.0014783788028779957 1 0 0 1 0 15.451483287526523 -.006142820578448937 22.086035653019344   .05323777834655746                    0    .061428205784489376  4 1 0 0 1  22
          2010 6120 23 1601156441  -.024535467379349522 1 0 1 1 0 18.847859527956548   .09610019516984566   26.2469283295635  .062151019153785056    .2348384161308476    .019421195684710898 11 0 0 1 1  23
          2010 6120 23 1601359606  .0005863178880226418 1 0 1 0 0  18.60764940288825   .09610019516984566   26.2469283295635  .062151019153785056    .2348384161308476    .019421195684710898 11 0 0 1 1  23
          2018 6120 23 1941109394   .016626337031694877 1 0 1 0 0   21.5226212607416   .05223820557379159 26.239078835296056   .08076285640728584   .34207054128853703     .03706877132007466 11 0 0 1 1  31
          2014 6120 23 1909078824  -.007575860687938888 1 0 1 1 0  19.97342647737158   .07390118574169503 26.329310520867196   .12075378768387082    .3245830055942308    .040401961288804925 11 0 0 1 1  27
          2016 6120 23 1909505367   .013426533978420054 1 0 1 0 0  19.34027923914059    .0572978731799708 26.258353487723316   .08449275934183009   .31754725170658565     .04385037288403109 11 0 0 1 1  29
          2013 6120 23 1909053213   .014340073451217716 1 0 0 0 0 17.741670563447034   .08946398341955795 26.255975252579404   .13003702121600455    .3093209612859335     .04187036245985413 11 1 0 0 1  26
          2012 6120 23 1601401077    .01371276682065599 1 0 1 1 0 18.686015285085006   .08895931053192367  26.26194172327619   .11952457527492619   .31409800228826656     .03534231602454972 11 0 0 1 1  25
          2018 6120 23 1941086077  -.012386485790460084 1 0 0 1 0 20.689581827124027   .05223820557379159 26.239078835296056   .08076285640728584   .34207054128853703     .03706877132007466 11 0 0 1 1  31
          2017 6120 23 1941014385   -.05927120552333416 1 0 1 1 0 18.132998671500584    .0511062355184646 26.219798614483807   .12065041317230207   .35082531936270994    .014234452213496278 11 0 0 1 1  30
          2017 6120 23 1909582166   .029169914252961313 1 0 1 1 0 18.921456031864853    .0511062355184646 26.219798614483807   .12065041317230207   .35082531936270994    .014234452213496278 11 0 0 1 1  30
          2011 6120 23 1601247046    .01832979558706735 1 0 1 1 1  19.66527616292371   .09585199365056857  26.26013149024568  .051595038620456044    .2626506119008512     .04360704424513847 11 0 0 1 1  24
          2015 5829 24 1909198870   .021728172695725446 1 0 1 1 0  16.68337764132035   .05339152589509191 19.222404263861918   .06773183575702663    .1201903668284456    .015376472382456109  8 0 0 1 1  19
          2017 5829 24 1939003172   .006261689064410537 1 0 1 0 0  14.73180128983843   .07282205600427417 19.355015695284308  .048575536629058114   .09901709670322763    .013144661994405858  8 0 1 0 1  21
          2010 5829 24 1601156599    .03775199254209411 1 0 1 1 0  15.05437162700443     .096754030826053 18.069632795878764  .049733645855529515   .30604446338518365     .01596704311385752  8 1 0 0 1  14
          2014 5829 24 1909157082     .0563943986225347 1 0 1 1 0 17.644221082498753   .04107082100401068  19.08327592921779   .07580600261879969    .1393170500355703    .017676897856502147  8 0 1 0 1  18
          2015 5829 24 1909218638    .09425125546655166 1 0 1 0 0  16.18105354856843   .05339152589509191 19.222404263861918   .06773183575702663    .1201903668284456    .015376472382456109  8 0 0 1 1  19
          2016 5829 24 1909350046   .038507728860738416 1 0 0 1 0 14.896108219910062   .06104714316749946  19.34955200803185   .06418738767207158   .10410996780755634    .013445776469891178  8 0 1 0 1  20
          2015 5829 24 1909213814  -.001851615108601828 1 0 1 1 0 15.725053062848712   .05339152589509191 19.222404263861918   .06773183575702663    .1201903668284456    .015376472382456109  8 0 0 1 1  19
          2012 5829 24 1601406691   -.09099816940182205 1 0 0 1 0 15.191890937570351   .08174683823259343  18.21830748884662  .023286279214975697    .2184404804172431      .0815754355464685  8 0 1 0 1  16
          2014 2529 25 1909078886   -.06708717762129172 1 0 0 1 0 16.674732148068145   .10555695670449768 17.901066614153297   .10686843211433375  .005447667087011349    .003026481715006305  6 1 0 0 1   7
          2014 2529 25 1907064110  -.005553421433753396 1 0 1 1 0 16.554159150198032   .10555695670449768 17.901066614153297   .10686843211433375  .005447667087011349    .003026481715006305  6 1 0 0 1   7
          end

          The code I ran without fixed effects:
          Code:
          reg car22 fam_own ceo cross_border cross_industry target_listed log_deal ret_assets log_size cash_hold long_lev short_lev deal_act cash stock other success age, vce(cluster company)
          Output:
          Linear regression Number of obs = 1,329
          F(16, 490) = 6.53
          Prob > F = 0.0000
          R-squared = 0.0192
          Root MSE = .07059

          (Std. err. adjusted for 491 clusters in company)
          --------------------------------------------------------------------------------
          Robust
          car22 | Coefficient std. err. t P>|t| [95% conf. interval]
          ---------------+----------------------------------------------------------------
          fam_own | .0024764 .0044088 0.56 0.575 -.0061859 .0111388
          ceo | .006265 .0082263 0.76 0.447 -.0098981 .022428
          cross_border | -.001702 .0040703 -0.42 0.676 -.0096994 .0062954
          cross_industry | -.0050128 .0042981 -1.17 0.244 -.0134578 .0034321
          target_listed | -.0008067 .0121564 -0.07 0.947 -.0246917 .0230783
          log_deal | .0021525 .0012018 1.79 0.074 -.0002089 .0045138
          ret_assets | -.0006957 .0162235 -0.04 0.966 -.0325719 .0311806
          log_size | -.003442 .0011308 -3.04 0.002 -.0056639 -.0012202
          cash_hold | -.0143552 .0245002 -0.59 0.558 -.0624936 .0337833
          long_lev | -.0034416 .0127224 -0.27 0.787 -.0284387 .0215556
          short_lev | -.0003464 .0014706 -0.24 0.814 -.0032359 .0025431
          deal_act | -.0002901 .0002491 -1.16 0.245 -.0007795 .0001994
          cash | 0 (omitted)
          stock | -.0013787 .0092556 -0.15 0.882 -.0195643 .0168069
          other | -.0028303 .0040768 -0.69 0.488 -.0108405 .0051799
          success | .0061343 .0076844 0.80 0.425 -.008964 .0212327
          age |. .0000301 .0000445 0.68 0.499 -.0000573 .0001174
          _cons | .0549484 .022285 2.47 0.014 .0111625 .0987343
          --------------------------------------------------------------------------------


          Consecutively, I added industry fixed effects and I get this error (same when using i.year):
          Code:
          reg car22 fam_own ceo cross_border cross_industry target_listed log_deal ret_assets log_size cash_hold long_lev short_lev deal_act cash stock other success age, i.industry vce(cluster company)
          option i.industry not allowed
          r(198);

          If I use xtset command then this error is given:
          Code:
          xtset industry year
          repeated time values within panel
          r(451);

          How can I obtain results with industry and year fixed effects for my data set?

          Comment


          • #6
            Arturs:
            1) -i.industry- should come before the comma:
            Code:
            , i.industry
            2) to avoid this nuisance with -xtset- you can -xtset- your dataset with the -panelid- only, being aware that this fix will make time-series operator uanvailable. That said, you can still add -i.year- to your predictors.
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment

            Working...
            X