Announcement

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

  • model specification fixed effects

    Hello Statalists,

    I know that there have been plenty of questions about the fixed effects model and I have tried to find an adequate solution for my specific question, but it seems like it is either that obvious so noone has asked it yet, or it is too specific. In particular I have two questions about the specification of my regression model. 1) Do I define the panel variable in the correct way and 2) Can I include my explanatory variables the way I did.

    My data set is a panel data set containing observations for multiple firms across different industries for a time period of 8 consecutive years. Consistent with the literature in this field I used a fixed effects model with the following code:


    xtset industry

    xtreg y x1 x2 x3 ... i.year, fe vce(robust)



    I would like to measure the effect of x on y for a company and I would like to control for industry fixed effects and year fixed effects as well. Stata is giving me no error message so I assumed everything is fine.
    The problem is, I don't know if it is correct for me not to define a time variable in the xtset command and furthermore if it is correct to use industry as a panel variable. Is there a difference when I choose xtset companyID as a panel variable? Does Stata perform the the regression with the same sample? I only did the xtset industry command because the option ,fe would control for industry fixed effects that way, which is what I intended. If I would use for example:

    xtset companyID year
    xtreg y x1 x2 x3 ... i.year i.industry, robust


    would that give me the same results?

    The second question about the explanatory variables in the fixed effects model has to do with time invariant variables. Now I know that the fixed effects model excludes time invariant variables from the regression since it controls for those effects, but I wonder if this is the case when I have time invariant variables on company level and not on industry level (since the fixed effects are on industry level and not on company level). For example, one x variable is a dummy variable that is 1, if company i has foreign subsidiaries and 0 otherwise. In my data set, when a firm has foreign subsidiaries, they do so over the whole sample period, so this variable does not vary for company i across time. But it varies across companies and therefore across industries too. When I include fixed effects on company level, this variable wouldn't make any sense, I am aware of that, but since the fixed effects are on industry level, can I draw inferences from the coefficient? Stata again is not giving me an error, nor is Stata omitting these variables. The only omitted variable (that I can see in the output) is one from the year dummies, as it is supposed to. The industry fixed effects are not reported because of the ,fe option.

    I would appreciate it if someone could clear things up for me a little and help me out.
    Thank you very much in advance! Regards,
    Daniel








  • #2
    Actually, this general question comes up quite frequently here.

    You seem to have a grasp of some of the general principles that govern, but are unsure how they apply to your situation. In particular, you are clear that if you use firm-level fixed effects, your industry-level effects cannot be included in the model because they do not vary within firm. But there are a few other important general principles that also govern:

    1. When you use firm-level fixed effects, any industry-level effects are also automatically controlled for. So if your concern about industry-level effects arises from the possibility of unobserved variable bias, you needn't worry. The firm-level fixed effects take care of it.

    2. When you use firm-level fixed effects, any industry-level effects are inherently impossible to estimate. So if your interest is in actually estimating industry level effects, you simply can't use a fixed-effects model at all. You should consider a random-effects model or, even better, a multi-level model with observations nested within firms nested within industry to do that.

    3. In a situation where the data provides observations nested within firms nested within industries, a fixed-effects model with industry as the panel variable is inherently mis-specified and results from it are, in general, not valid. This is because the panel estimators are contingent on the assumption that the observations within panel are independent. But the observations within industry are clustered within panels and hence are very likely not independent. If you ran such a model and you found that sigma_u and rho are both very close to zero, and if the final line "Ftest that all u_i = 0:..." didn't reject, then you could decide that your observations are, as extraordinary luck would have it, are independent. But in that case, it would make sense to abandon panel estimators altogether and just go to OLS.

    So, as applied to your situation:
    Code:
    xtset industry
    
    xtreg y x1 x2 x3 ... i.year, fe vce(robust)
    is almost certainly a mis-specified model, as per #3.

    And
    Code:
    xtset companyID year
    xtreg y x1 x2 x3 ... i.year i.industry, robust
    will not give you the same results--it will give reasonably valid and useful results, but the industry indicator variables will all be dropped due to collinearity with the companyID effects.

    Comment


    • #3
      Thank you for your quick reply! So it seems like I am currently using a mis-specified model then. The F test is actually not reported in many of my regressions. But If I respecify it the second way it should work for me. I have a follow up question though. In number 2) you said that a fixed effects model would not work in case I am interested in controlling for industry level fixed effects. But inset that second code also a fixed effects model, with industry level fixed effects? And why are the dummy variables dropping out? I don't include firm level fixed effects, so I thought that should work. One hypothesis is actually based on one of the dummy variables that would be affected by it.

      As an alternative you suggested a random effects model, would my original specification be correct if I just change the ,fe option to ,re? Or do I need to change the xtset to companyID in every possible case?

      Comment


      • #4
        you said that a fixed effects model would not work in case I am interested in controlling for industry level fixed effects.
        You misunderstood me, perhaps I was not clear. The fixed effects model with firm-level fixed effects is perfectly good for controlling industry-level effects. In fact that was the point in 1. What it can't do is estimate the industry-level effects. That's an entirely different matter. If industry-level effects are a focus of interest in your study, you can't do it with a fixed-effects model in this data. But if they are important only as a nuisance source of variation that must be controlled for, firm-level fixed effects are fine and dandy.

        But inset that second code also a fixed effects model, with industry level fixed effects? And why are the dummy variables dropping out? I don't include firm level fixed effects, so I thought that should work
        Yes that second model is also a fixed effects model. But because of the -xtset companyID year- command, it is a model with company level fixed-effects. When you -xtset- your data, that setting determines the variable that -xtreg, fe- uses as the fixed-effects (unless you override that with the seldom-used -i()- option.) When you then try to add in the i.industry variables, they get omitted because they are collinear with those firm-level fixed effects. My point was, though, that despite the explicit variables for industry being omitted from the analysis, any industry-level effects are already controlled for by the firm-level fixed effects. They are controlled for, but not estimated and not estimable in a fixed-effects model.


        Comment


        • #5
          ah ok, I didn't consider the difference in controlling for industry fixed effects and estimating them.

          Would be possible in the second model to just leave out the ,fe option? Wouldn't Stata then just include industry (i.industry) and year (i.year) fixed effects?

          Comment


          • #6
            Daniel:
            if you omit the -fe- specification in -xtreg-, Stata assumes that you meant -re-, and calculates accordingly this latter specification (which is defaulf for -xtreg-).
            Kind regards,
            Carlo
            (Stata 19.0)

            Comment

            Working...
            X