Announcement

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

  • Panel data with industry, country and year fixed effect

    Hi all,
    I am new to STATA and I am really struggling with my research now. Can someone help me to look at my questions?
    My data looks like this:
    Firm female size leverage year15 year industry country
    1 1 7.6 2.1 0 2014 2 1
    1 0 8.0 2.5 1 2015 2 1
    1 0 7.7 2.2 1 2016 2 1
    2 0 3.6 1.2 0 2013 5 2
    2 0 3.1 1.5 0 2014 5 2
    3 1 5.6 3.1 0 2014 8 3
    3 1 5.8 3.4 1 2015 8 3


    My dependent variable (y) is a dummy variable that is 1 if the CEO is a female and 0 if male. I have firm size, leverage, year15 (dummy variable that is 1 if the year is in or after 2015, and 0 otherwise), year, industry, and country (the study is international based so it has various countries. I code China as country 1 and U.S. as country 2 and Canada as country 3).

    My questions are:
    1. I want to run a probit/logit model to determine what factors are related with the CEO gender. Should I use probit or logit (I have about 1,000 observations)
    2. The data is a panel data (3 firms over 4 years from year 2013 to year 2016) and is sorted based on firm and year. But how can I control for year fixed effect, industry fixed effect and country fixed effect? Should I put:
    Xtset industry
    Xtprobit female size leverage year15 i.industry i.year i.country, fe


    Or
    Xtset industry country year
    Xtprobit female size leverage year15 i.industry i.year i.country, fe


    Or
    Xtset industry country year
    Xtprobit female size leverage year15, fe

    Which one is right? If none of them is right, can someone tell me how to do the year, industry and country fixed effects?
    1. Related with question 2, I read online that there is no fixed effect model for probit regression. Does that mean I can only use probit fixed effect as shown in question 2?
    2. The last question is, since I have a dummy variable, year15, which is 1 for year 2015 and 2016, and 0 for year 2013 and 2014. Can I or should I still have the year fixed effect? Or I just should use industry and country fixed effects?
    I know my questions are a lot. But can someone help me with them? I have spent days on solving them but still cannot find a good way.

    Regards.
    THANK YOU.

  • #2
    1. logit vs probit are normally seen as a toss up - most lean to logit on this listserve. There are differences but not in the main analysis. There is an xtlogit with fixed effects, but they are conditional fixed effects - Silva on this listserve has commented on these issues. i.panel works for regression, but I'm not sure it truly handles the fixed effect issue in logit/probit.

    2. If you set the panel as industry, then you don't put i.industry into the xtprobit separately. You will get problems with several of your xtset statements because you will have multiple companies within an industry meaning that you will have multiple of the same date within a panel. So, Stata will probably only accept the first xtset statement. However, for most of your data manipulation, I'd think you would want to set the xtset to be firm year. Then you can do lags and leads etc. easily. Depending on the discipline, many some would demand the panel effect be at the firm level, not the industry level.

    3. How can you possibly have 1000 observations when you have 3 firms over 4 years?

    Comment


    • #3
      Hi all,
      I am new to STATA and I am really struggling with my research now. Can someone help me to look at my questions?
      My data looks like this:
      Firm female size leverage year15 year industry country
      1 1 7.6 2.1 0 2014 2 1
      1 0 8.0 2.5 1 2015 2 1
      1 0 7.7 2.2 1 2016 2 1
      2 0 3.6 1.2 0 2013 5 2
      2 0 3.1 1.5 0 2014 5 2
      3 1 5.6 3.1 0 2014 8 3
      3 1 5.8 3.4 1 2015 8 3


      My dependent variable (y) is a dummy variable that is 1 if the CEO is a female and 0 if male. I have firm size, leverage, year15 (dummy variable that is 1 if the year is in or after 2015, and 0 otherwise), year, industry, and country (the study is international based so it has various countries. I code China as country 1 and U.S. as country 2 and Canada as country 3).

      My questions are:
      1. I want to run a probit/logit model to determine what factors are related with the CEO gender. Should I use probit or logit (I have about 1,000 observations)
      2. The data is a panel data (3 firms over 4 years from year 2013 to year 2016) and is sorted based on firm and year. But how can I control for year fixed effect, industry fixed effect and country fixed effect? Should I put:
      Xtset industry
      Xtprobit female size leverage year15 i.industry i.year i.country, fe


      Or
      Xtset industry country year
      Xtprobit female size leverage year15 i.industry i.year i.country, fe


      Or
      Xtset industry country year
      Xtprobit female size leverage year15, fe

      Which one is right? If none of them is right, can someone tell me how to do the year, industry and country fixed effects?

      3. Related with question 2, I read online that there is no fixed effect model for probit regression. Does that mean I can only use logit fixed effect as shown in question 2?


      4. The last question is, since I have a dummy variable, year15, which is 1 for year 2015 and 2016, and 0 for year 2013 and 2014. Can I or should I still have the year fixed effect? Or I just should use industry and country fixed effects?


      I know my questions are a lot. But can someone help me with them? I have spent days on solving them but still cannot find a good way.

      Regards.
      THANK YOU.
      Last edited by xiaoxiao song; 29 Jun 2018, 11:01.

      Comment


      • #4
        Originally posted by Phil Bromiley View Post
        1. logit vs probit are normally seen as a toss up - most lean to logit on this listserve. There are differences but not in the main analysis. There is an xtlogit with fixed effects, but they are conditional fixed effects - Silva on this listserve has commented on these issues. i.panel works for regression, but I'm not sure it truly handles the fixed effect issue in logit/probit.

        2. If you set the panel as industry, then you don't put i.industry into the xtprobit separately. You will get problems with several of your xtset statements because you will have multiple companies within an industry meaning that you will have multiple of the same date within a panel. So, Stata will probably only accept the first xtset statement. However, for most of your data manipulation, I'd think you would want to set the xtset to be firm year. Then you can do lags and leads etc. easily. Depending on the discipline, many some would demand the panel effect be at the firm level, not the industry level.

        3. How can you possibly have 1000 observations when you have 3 firms over 4 years?


        Thank you, Phil Bromiley, for your reply.
        So my understanding is that:
        1) I can use the probit model with fixed effect, but the results may be conditional.
        2) I am not sure about your reply to the second question.
        I agree with you that "You will get problems with several of your xtset statements because you will have multiple companies within an industry meaning that you will have multiple of the same date within a panel.", and this is exactly what I got when I rand the data, and now I understand the reason. Thank you.
        But I am not sure what I should do. It is a firm-year panel data and the data is sorted by firm and year, not by the industry and country. But when I read other papers, they always say "we control for the unobservable industry and year and country variables by adding industry and year and country fixed effect'. So my question is, given a firm-year panel data, how can I run regression with country, year and home fixed effects? How can I add all these 3 factors (industry, year and country) for my firm-year panel data?
        3) So I can only run logit fixed effect, right? Since there is no fixed effect for probit regression.
        4) How about the last one? If I include year fixed effect, can I also include a dummy variable related with year?
        "The last question is, since I have a dummy variable, year15, which is 1 for year 2015 and 2016, and 0 for year 2013 and 2014. Can I or should I still have the year fixed effect? Or I just should use industry and country fixed effects?"

        I have 1,000 observation because the data I posted here is only part of the full sample. The full sample has 400 firms over 4 years (some years there is missing firm).

        Thank you.

        Comment

        Working...
        X