Announcement

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

  • Fixed effect in xtlogit

    Dear Scholars,
    I am trying run a xtlogit model with fixed effect on industry, location and year. I used the following commands

    xtset panelid year
    xtlogit CREDIT d3c lnage proptnownL lctn_dhk lctn_cht d3b domestic_firm state_firm exp_manager sex_manager i.industry i.year

    I am trying to find industry and year fixed effect. My question is do I need to write fe in my command? or I am good to go?

    Thanks.

  • #2
    Sungida:
    your code seems to miss a -, fe- at ist end.
    Then you can go that way.
    Code:
    xtset panelid year
    xtlogit CREDIT d3c lnage proptnownL lctn_dhk lctn_cht d3b domestic_firm state_firm exp_manager sex_manager i.industry i.year, fe
    As an aside, please be advised that under -xtlogit, fe- you will get coditional fixed effects, which are different from the ones you can get under -xtreg, fe-.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      You could also use the clogit command here. More information attached. The coded is a bit simpler, faster, and no need to xtset the data!


      PS fixed effects will not be available for variables which do not vary by clusters. If your data is arranged by time, for example, measures like industry might be affected. This can be a bit of a headache, FWIW.
      Last edited by Ivan Privalko; 13 Nov 2017, 03:01.

      Comment


      • #4
        Dear Sungida:

        Just to add to the excellent advice already provided, notice that the panel needs to be "large" in the dimensions of the fixed effects that you include in the model as dummies; it does not have to be large in the dimension of the fixed effect you condition out.

        Best wishes,

        Joao

        Comment


        • #5
          Thanks for your valuable suggestions. My dependent variable Credit is a dummy. Total sample size is 3298. I tried both xtlogit,fe and clogit, group(). But both of them takes aroung 5 to 6 hours to compute and finally tells me "congergence is not achived". To be mentioned, there are huge sample drop (around 2300) in both codes. Can I solve this issue in any other way?

          Thanks in advance.

          Comment


          • #6
            Hi Sungida,

            The reason why you have a huge drop in the sample is because fixed effects will only compute estimates for clusters which move between values of 0 and 1 for Credit. So if a cluster holds only values of "0" for each observation, or only values of "1" for each observation, it cannot contribute to the model. It sounds like your Dependent Variable tends to stick to one value. My 2c.
            Last edited by Ivan Privalko; 14 Nov 2017, 09:57.

            Comment


            • #7
              Alternatively, it could be one of your independent variables, I would try building the model one variable at a time. Maybe one of you controls varies little over "year"

              Comment


              • #8
                Thanks a lot for your suggestions Ivan Privalko. I will recheck all of my variables again.

                Comment

                Working...
                X