Announcement

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

  • Panel data problems controlling for industry

    Hello everyone. i have a panel data set that looks at the impact of ESG scores on Firm performance ( Tobins Q), controlling for leverage, firm size, boardsize, capex, sales revenue and 11 industries. For the industry i created 10 dummy variables. My econometrics is quite limited as i haven't been learning for long but i i followed a panel data guide and this is what i have done so far in STATA:


    OLS: reg esg tobinsq size leverage boardsize Sales Capex2 dummy2 dummy3 dummy4 dummy5 dummy6 dummy7 dummy8 dummy9 dummy10 dummy11

    RANDOM: xtreg esg tobinsq size leverage boardsize Sales Capex2 dummy2 dummy3 dummy4 dummy5 dummy6 dummy7 dummy8 dummy9 dummy10 dummy11, re

    Fixed: xtreg esg tobinsq size leverage boardsize Sales Capex2 dummy2 dummy3 dummy4 dummy5 dummy6 dummy7 dummy8 dummy9 dummy10 dummy11, fe

    The hausman test, breusch-pagan test, and F test tell me that i should use FIXED effects

    PROBLEMS:

    - for fixed effect, all my 8 of the 10 dummy variable are omitted due to collinearity -> from my understanding, shouldn't all of them dummy variables for industry get omitted?
    - if was to use fixed effect, how would i control for industry then?


    Sorry for long post but wanted to provide as much detail.

    Any response is appreciated.



  • #2
    Harry:
    just create an unique categorical variable for industry (see also -label-) and re-run your regression.
    In addition, please share what you typed and what Stata gave you back (as per FAQ). Thanks.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Hi Carlo, thanks for the response. I am bit confused. I have 11 industries so how do i create a unique categorial variable? thanks!

      Comment


      • #4
        Harry:
        you can code each industry as 1, 2, 3...11 and then -label- (if you want) them:
        Code:
        . set obs 11
        Number of observations (_N) was 0, now 11.
        
        . g industry=_n
        
        . label define industry 1 "Tennis" 2 "Soccer" 3 "Handball" 4 "Basketball" 5 "Volleyball" 6 "Padel" 7 "Rugby" 8 "Wrestling" 9 "Golf" 10 "Judo" 11 "Rafting"
        
        . label val industry industry
        
        . list
        
             +------------+
             |   industry |
             |------------|
          1. |     Tennis |
          2. |     Soccer |
          3. |   Handball |
          4. | Basketball |
          5. | Volleyball |
             |------------|
          6. |      Padel |
          7. |      Rugby |
          8. |  Wrestling |
          9. |       Golf |
         10. |       Judo |
             |------------|
         11. |    Rafting |
             +------------+
        
        .
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          Carlo:


          I have my 1206 observations assigned to an industry from 1-11 already. I am confused as what to do next. Sorry if i am being difficult - i am a novice!

          Comment


          • #6
            Re-run all of the regressions, eliminating the dummy* variables and using, instead, i.industry (where industry is the name of your 1-11 industry variable.) E.g.:
            Code:
            reg esg tobinsq size leverage boardsize Sales Capex2 i.industry
            and similarly for the others.

            You never said at what level your fixed effects were defined for the -fe- model. If it was at the firm or industry level, then the i.industry variable(s) should be eliminated automatically by Stata. If that does not happen, there is a problem with your data: there will be some firm or firms coded in different industries at different times. You will need to find and fix that (those) data error(s).

            In the event that you encounter this problem and are not able to resolve it on your own, when you post back show example data that demonstrates the problem, along with the exact code that is involved. Use the -dataex- command for showing the example data. 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- to read the simple instructions for using it. -dataex- will save you time; it is easier and quicker than typing out tables. It 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. When showing example data, always use -dataex-.

            if was to use fixed effect, how would i control for industry then?
            First a note about language. Unless your data come from a randomized experiment, it is an abuse of language to speak of "control" of anything. The inclusion of variables results in adjustment for the effects of those variables. But that is different from true "control." I realize that people use the phrase "control for X" all the time. But it is a misuse of the term control, and leads to sloppy thinking. True "control" of a variable in an experiment leads to elimination of its nuisance effects (omitted variable bias). Adjustment of an analysis for a variable can, if done well, reduce its nuisance effects, but it seldom eliminates them altogether, and if done poorly can actually make the bias worse.

            That said, if you run a fixed-effects model with fixed-effects at the firm level, and if each firm is always classified in the same industry, then industry is a time-invariant attribute of the firm. As such, its effects on the outcome are automatically adjusted for in the fixed effects model and you need not do anything at all. That is, indeed, one of the most advantageous features of fixed-effects regression: adjustment of all time-invariant attributes of the fixed effects is automatically done "for free."
            Last edited by Clyde Schechter; 28 Mar 2023, 11:49.

            Comment


            • #7
              Thank you so much Clyde and Carlo. It has been solved now. I appreciate your help and sorry for the excessive and inexperienced replies, i imagine they must be frustrating!!!

              Comment


              • #8
                Harry:
                no, they aren't frustrating at all.
                They're simply the signs that you're interested in learining something new.
                Quoting Nick Cox "We all beginners; some of us are only more experienced" (in all likelihood Nick's English is just a bit better than mine , but this is a different story).
                So true (for me, at least).
                Kind regards,
                Carlo
                (Stata 19.0)

                Comment

                Working...
                X