Announcement

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

  • Problem with Industry Fixed Effects for xlogit

    Hey guys,

    I am using Compustat data to run a Panel data Logit regression with industry fixed effects. To set panel data I used:

    xtset gvkey year

    I would like to estimate a Logit model with industry fixed effects. Therefore, I created industry which takes values from 1 to 10 representing 10 different industries (based on Compustat's SIC Codes). The code I used for my regression is:

    xtlogit liabilities size value i.industry, fe

    Stata revealed:
    note: 1.industry omitted because of no within-group variance.
    note: 2.industry omitted because of no within-group variance.
    note: 3.industry omitted because of no within-group variance.
    note: 4.industry omitted because of no within-group variance.
    note: 5.industry omitted because of no within-group variance.
    note: 6.industry omitted because of no within-group variance.
    note: 7.industry omitted because of no within-group variance.
    note: 8.industry omitted because of no within-group variance.
    note: 9.industry omitted because of no within-group variance.
    note: 10.industry omitted because of no within-group variance.

    So I tried:
    xtlogit liabilities size value, i(industry) fe

    This time Stata revealed:
    warning: existing panel variable is not industry

    Does anyone have a suggestion/idea how to implement the Industry Fixed Effects Panel-Data Logit regression?

    If my information is not sufficient, please feel free to ask.

    Thanks.

    Regards,
    Benny

  • #2
    Well, the warning you got about the existing panel variable not being industry is just a warning. Basically Stata's just asking whether you're sure you want to do that. But if that's what you want you can. If the warning really bothers you, can do -xtset industry- followed by -xtlogit liabilities size valuel, fe-, and you should have no problem.

    But, even though you can do that, it seems to ignore the multi-level structure in your data. Why not

    Code:
    xtset industry
    xtlogit liabilities size value i.gvkey, fe

    Comment


    • #3
      Originally posted by Clyde Schechter View Post
      Well, the warning you got about the existing panel variable not being industry is just a warning. Basically Stata's just asking whether you're sure you want to do that. But if that's what you want you can. If the warning really bothers you, can do -xtset industry- followed by -xtlogit liabilities size valuel, fe-, and you should have no problem.

      But, even though you can do that, it seems to ignore the multi-level structure in your data. Why not

      Code:
      xtset industry
      xtlogit liabilities size value i.gvkey, fe
      If I am using your code, Stata reveals: r(103);

      The warning doesn't bother me, but I am not sure whether my code reveals what I want to obtain. So the warning deters me from using "xtlogit liabilities size value, i(industry) fe". Furthermore, using "xtlogit liabilities size value, i(industry) fe" reveals the following:

      1,081 (group size) take 576 (# positives) combinations results in numeric overflow; computations cannot proceed r(1400);
      Last edited by Benny Miller; 19 Apr 2015, 17:41.

      Comment


      • #4
        OK, so Stata is saying that this specification of the problem is too large. Are you completely wedded to fixed effects? What about a hierarchical random effects model:

        Code:
        melogit liabilities size value || industry: || gvkey:

        Comment


        • #5
          For my thesis I am replicating an empirical study. The authors did a Logit regression of liabilities. In their estimation, the authors included Industry Fixed Effects. (In their tabulated results underneath the last explanatory variable and above the Pseudo R^2, a point is included which is called "Industry Fixed Effects". In this row no coefficient is shown but a "Yes")
          So I interpreted this table as if I had to use Industry fixed effects. But maybe I simply misunderstood what the authors did in their study.

          Comment


          • #6
            It appears that there is no variation in industry across time for a given firm. You have 10 industry categories but a firm is always in the same industry. In this case, you cannot have industry effects when you are allowing fixed effects a the firm level -- as your first command allows. And if you are controlling for firm fixed effects then controlling for industry FEs is redundant.

            My guess is that the paper you are replicating did not allow firm fixed effects. It either did pooled logit or random effects logit and included dummies for the 10 industries. From a causality point of view, this is inferior to allowing each firm to have its own FE.

            The code is either

            Code:
            logit liabilities size value i.industry, cluster(gvkey)
            or

            Code:
            xtset gvkey year
            xtlogit liabilities size value i.industry, re
            With pooled logit you should definitely cluster the standard errors at the firm level.

            By the way, I would not believe any results that do not also include year effects. In fact, I wouldn't even start to be convinced unless one allows firm-level fixed effects and year effects:

            Code:
            xtset gvkey year
            xtlogit liabilities size value i.year, fe

            Comment


            • #7
              Thanks, Jeff.

              The authors of the study write, that they used heteroskedasticity-robust standard errors and clustered them by firm. Is this a hint, whether they used the pool logit or the random effects model?
              What would be the code for the pooled logit regression and the random effects regression, respectively given that I xtset gvkey year?

              By the way, the equation for their model is:

              liabilities = b1+b2(size)+b3(value)+Industry Fixed Effects + ยต

              Comment


              • #8
                When I am using:
                xtlogit liabilities L.size L.value i.industry, re vce(cluster gvkey) Stata says:
                Calculating robust standard errors:
                calculation of robust standard errors failed
                r(198);

                However, when I am using:
                xtlogit liabilities size value i.industry, re vce(cluster gvkey) Stata runs the regression without any problem.
                Any idea how to solve this issue?

                Comment

                Working...
                X