Announcement

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

  • year and industry fixed effects regression


    please I'm investigating the impact of chief risk officer (independent dummy variable) on performance (dependent variable) for S&P 500 from 2004 -2021. the supervisor wants me to use year and industry fixed effects regression.
    what i did is as following

    Firstly i created a dummy variable for both year and industry

    after that run a regression using OLS and control for both year and industry as following

    reg y x1 x2 ..... i. Industry i. Year

    my question is. year and industry fixed effects regression is the same of general OLS with a control for industry and year.

    Is what i did right or wrong ?
    Last edited by hussein bataineh; 24 Apr 2023, 10:39.

  • #2
    What you did is one way to do it. Yes, a year and industry fixed-effects linear regression is the same as an OLS regression with industry and year covariates. It is the same in the sense that the results will be the same. It will, however, generate an enormous amount of output, most of which you probably don't want or need to see. For example, you will get a coefficient for every industry and one for every year. To get more compact output, you can get the same results using:
    Code:
    reghdfe y x1 x2, absorb(Industry Year)
    -reghdfe- is written by Sergio Correa and is available from SSC.

    Comment


    • #3
      Thanks a lot for your comments and suggestions , please im following a paper and in this paper there is a sentence that is written ( Standard errors clustered by firm ) i think when i control for industry and year in my model the Standard errors will be already clustered by firm. is this right . or what this mean please
      Click image for larger version

Name:	Screenshot 2023-04-24 120837.png
Views:	3
Size:	34.0 KB
ID:	1711070
      Attached Files

      Comment


      • #4
        i think when i control for industry and year in my model the Standard errors will be already clustered by firm
        No, that's not right. To get standard errors clustered by firm, you have to include -vce(cluster firm)- in the options of your regression command (whether it is -regress-, or -reghdfe-, or any other Stata regression command.)

        Comment


        • #5
          please

          my model for the year and industry fixed-effects


          reghdfe pensionassetallocationequitywh csopresence firmsizewh ROAwh operationcashflowvolatilitywh leveragewh dividendpayoutwh boardsizewh boardindependencewh contributionwh pension_sizewh durationwh planreturnswh discountratewh mergersaquisitions, absorb( sic year )


          Now i want to get standard errors clustered by firm, i used Ticker to identify firms

          but when i tried to add cluster in regrassion

          reghdfe pensionassetallocationequitywh csopresence firmsizewh ROAwh operationcashflowvolatilitywh leveragewh dividendpayoutwh boardsizewh boardindependencewh contributionwh pension_sizewh durationwh planreturnswh discountratewh mergersaquisitions, absorb( sic year ) , vce(cluster ticker )

          it give me invalid 'vce'

          Comment


          • #6
            There should not be a comma before vce(cluster ticker). In Stata syntax, a single comma separates the main part of the command from all of the options, but no commas are used between options. (Some options take -suboptions, which are then set off by a comma and inside the parentheses of the option, but this is not such a circumstance. -vce()- is not a suboption of -absorb()-.)

            Comment

            Working...
            X