Hello Statalist,
I want to conduct a difference-in-difference analysis with time and firm fixed effects using panel data. I want to run both -reg- and -xtreg- commands to calculate the DID estimator. I am not sure whether in my -reg- command I account for firm-fixed effects if I write it as follows:
For the sake of completeness, here is my -xtreg- command:
Could someone kindly provide me with some feedback on whether these commands are correct, and particularly whether #1 (the -reg- command) accounts for firm-fixed effects?
Kind regards,
Max
I want to conduct a difference-in-difference analysis with time and firm fixed effects using panel data. I want to run both -reg- and -xtreg- commands to calculate the DID estimator. I am not sure whether in my -reg- command I account for firm-fixed effects if I write it as follows:
Code:
reg y i.treat##i.post i.time (other covariates), vce(cluster firmID)
Code:
xtreg y i.treat##i.post i.time (other covariates), fe
Kind regards,
Max
Comment