Announcement

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

  • Fixed effects for a logit model

    Dear all,

    For my thesis, I have panel data for which I need to estimate a logit model with both industry and year-fixed effects.
    My year variable ranges from 2010/2019, and my industry variable is the SIC code (retrieved from Compustat).

    I found the code:

    areg y i.year, absorb(industry)

    which seems suitable for a linear regression (with y being the dependent variable). However, I need to have a logit regression, since my dependent variable is a dummy variable. I already looked on the internet, but I cannot find if this code also holds for a logit regression. Is there anyone who knows how to include both industry and year-fixed effects in a logit model?

    Thank you in advance!
    Last edited by Laura Banken; 13 Jan 2021, 15:58.

  • #2
    Often, though not always, using Stata's search facility with "natural" keywords leads to a solution, and is always worth a try.
    Code:
    search fixed effects logit
    brings up quite a few relevant suggestions, as does the terminology popular outside economics.
    Code:
    search conditional logit
    I'd guess that -clogit- is the most relevant for you.

    Comment


    • #3
      Dear Laura, If you'd like to take into account the `firm' fixed effects and `year' fixed effects, Make's suggestion *above) will be fine (I assume that your data are firm-year observations). But, according to your description, you'd like to consider `industry' and `year' fixed effects. I think that you can try
      Code:
      logit y x1 x2 ... i.industry i.year, vce(robust)
      You might also be interested in
      Code:
       
      Bias corrections for probit and logit models with two-way fixed effects with Mario Cruz-Gonzalez and Iván Fernández-Val The Stata Journal, Volume 17, Number 3, September 2017, Pages 517-545
      Ho-Chuan (River) Huang
      Stata 19.0, MP(4)

      Comment


      • #4
        Thank you both very much!

        Comment


        • #5
          Dear Laura Banken,

          Just to follow up on River's comment above, please note that the logit or probit with the fixed effects as dummies are inconsistent estimators of the parameters of interest for the reasons described in the paper River referred to. If you have many industries and just 10 years, you should use xtlogit with fe (or the equivalent clogit) and can include year dummies (but not industry dummies).

          Best wishes,

          Joao

          Comment


          • #6
            As a further follow up: Context is everything. Roughly how many firms do you have per industry? If it is a lot, I would take River's suggestion, as there is no incidental parameters problem for including industry dummies if you have a lot of firms per industry. If there are few firms per industry then you should not treat the industry effects as parameters to estimate. Are these three or four digit SIC codes?

            Comment


            • #7
              Thank you both Joao and Jeff for your additional information! The number of observations per industry varies a lot, for some I have only 10, for some I have 2000. The SIC codes are with 3 digits.

              I now succeeded to run a logit regression with year and industry fixed effects with the code:
              'Logit y x1 x2 x3 i.sic i.fyear, vice(robust)'

              However now I see, in the output, that the year dummy variable only starts at 2013, while my panel data starts in 2010. Does anyone know the reason why three years are skipped? In addition, for the last year of my data (2019), it is said that '2019 is committed because of collinearity'
              Is this normal? I am a beginner in terms of STATA, so I have no idea...
              Thanks!

              Comment

              Working...
              X