Announcement

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

  • Bankcountryyear fixed effects

    Dear all,

    could you please kindly confirm, that the following code would mean "bankcountryyear" fixed effects for panel dataset?

    Generate BankCountry=Bank*Country
    xtset BankCountry Year
    xtreg depvar indvar1 indepvar2 $controls, fe

    thank you in advance!

  • #2
    That code will only work if you have only two banks and two countries. The first command should be:
    Code:
    egen BankCountry = group(Bank Country)
    Also, the -xtreg- command you have written does not include Year fixed effects. Those have to be specified separately by including i.Year among your list of regressors.

    Note that if you really want bank#country#year fixed effects, then it is different still:
    Code:
    egen BankCountryYear = group(Bank Country Year)
    xtet BankCountryYear
    xtreg depvar indvar1 indepvar2 $controls, fe
    But it is quite unusual to actually want this. And it makes no sense at all unless there are multiple observations for each (or at least many) combination of bank country and year. If bank, country, and year uniquely identify observations in your data, you definitely should not use BankCountryYear fixed effects: use BankCountry and Year separately as shown at the beginning of this response.

    Comment


    • #3
      Thanks a lot!
      Last edited by Anna Malinovskaya; 04 Nov 2019, 10:51.

      Comment

      Working...
      X