Announcement

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

  • Controlling for industries

    Good afternoon!

    I'm currently writing my thesis on the moderating effect of national culture on the relationship between CSR and firm performance. Since industry heavily affects firm performance, I want to control for it. In terms of data, I have the first 2 digits of the NACE Rev 2 classifications. In order to employ this as a control variable, would I need to create about a 100 dummy variables, or is there any other way?

  • #2
    Code:
    sysuse auto, clear
    
    *create indicator variables
    tab rep78, gen(D)
    reg price weight length D*
    
    *prefix the variable with i.
    reg price weight length i.rep78
    
    *use xtreg with fe option
    xtreg price weight length, fe i(rep78)

    Comment


    • #3
      Rachel:
      welcome to this forum.
      Please note that if you're dealing with panel data, continuous regerssand and -fe- specification (ie, -xtreg,fe-) all time-invariant variables (such as -i.industry-, if -panelid- do not change -industry- during the time-horizon the panel dataset stretches over) will be wiped out by the -fe- estimator.
      Kind regards,
      Carlo
      (StataNow 18.5)

      Comment

      Working...
      X