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.
Related Posts with three way panel data regression with fixed effects and clustered error term
Statistical inferenceThe country is Japan, the period is 1972-2020, and the data is annual information. The current accou…
merging data with different time frequenciesHello, I have looked for guidance from other posts but could not solve this: I have two datasets- 'D…
Generating new variables using macros and loopsHello, I am trying to generate new variables with the use of macros and having issues with the synta…
Help with clock() functionDear all, I had a time variable in string format. I use clock() function to change it to Stata read…
How to generate the Strong Parallel Trend Assumption presented in Callaway, Goodman-Bacon & Sant'Anna 2021I'm running a DID model with multiple timer periods and continuous treatment. I currently run the tr…
Subscribe to:
Post Comments (Atom)
0 Response to three way panel data regression with fixed effects and clustered error term
Post a Comment