Announcement

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

  • three way panel data regression with fixed effects and clustered error term

    Hi!

    I want to do a regression on panel data, the data consists of a bank (subscript i), in a country (subscript c), in a specific year (subscript t); and other dependent variables A_ict, B_ict, C_ict.
    Please note that I need to included fixed effects (FE) in bank (i) and year (t). (but not report them, neither should the constant be reported)
    Next, standard errors should be clustered at bank (i) level.

    Can you confirm if the following is the right code to use in Stata?


    INDEP_ict = α + β1 A_ict + β2 B_ict + β3 C_ict + u_i + v_t + ε_it

    egen panel_id = group(bank country)
    xtset panel_id year
    xtset id year
    xtreg INDEP A B C i.year, fe vce(cluster bank)
    outreg2 using regression_results, replace excel dec() drop(i.year)


    Thank you in advance.
    Last edited by Gregor Clegane; 07 Mar 2020, 02:01.

  • #2
    Please use real names here, not pseudonyms. The FAQ Advice explains why we ask this, and how to fix the problem.

    Comment


    • #3
      That looks right. Because banks don't change countries, the bank fixed effects take care of countries.

      Comment

      Working...
      X