Hi everyone,
I am trying to perform a basic DiD model ( I am only purely interested in the difference in firm's energy usage before and after a policy intervention). I am working with panel data with many firms before and after energy consumption usage data in kwh. Unfortunately, I do not have any other X variables like no. of ppl in the firm, size of the firm etc. My control group is another set of firms in a nearby community where the policy intervention is not yet implemented at the time periods I am looking at.
As such, I thought of using two way fixed effect model to cater for the many uncertainties in the treatment and control group. I understand that energy consumption can be influenced by seasonal trends such as weather patterns across the different time periods. As such I want to control for time effects as well.
I have tried using the following code for fixed effect and also the random effects model:
xtreg Ln(Energy Consumption) treatedt t treated time_dum, fe
where treated = treatment grp which also represent the community each firm belongs to
t= indicates time period following treatment
treatedt being the interaction of these two variables- DiD estimator
time_dum= time dummy variables to control for time effects
1 ) However, my treated variable keeps getting dropped by fixed effect model, which I understand why after combing through this forum . But I would need to know the coefficient and p-value of treated variable for my DiD analysis. Am I right? How can I keep this variable in the fixed effect model?
2) Since treatedt is the difference before and after the intervention in the treatment group, deducting away the difference in control group (which also includes seasonal trend), do I still have to add in time dummy variables in the coding to account for seasonal time trend?
P.S I am a beginner and any help is appreciated. Please correct me if I am wrong
Thank you for your time.
I am trying to perform a basic DiD model ( I am only purely interested in the difference in firm's energy usage before and after a policy intervention). I am working with panel data with many firms before and after energy consumption usage data in kwh. Unfortunately, I do not have any other X variables like no. of ppl in the firm, size of the firm etc. My control group is another set of firms in a nearby community where the policy intervention is not yet implemented at the time periods I am looking at.
As such, I thought of using two way fixed effect model to cater for the many uncertainties in the treatment and control group. I understand that energy consumption can be influenced by seasonal trends such as weather patterns across the different time periods. As such I want to control for time effects as well.
I have tried using the following code for fixed effect and also the random effects model:
xtreg Ln(Energy Consumption) treatedt t treated time_dum, fe
where treated = treatment grp which also represent the community each firm belongs to
t= indicates time period following treatment
treatedt being the interaction of these two variables- DiD estimator
time_dum= time dummy variables to control for time effects
1 ) However, my treated variable keeps getting dropped by fixed effect model, which I understand why after combing through this forum . But I would need to know the coefficient and p-value of treated variable for my DiD analysis. Am I right? How can I keep this variable in the fixed effect model?
2) Since treatedt is the difference before and after the intervention in the treatment group, deducting away the difference in control group (which also includes seasonal trend), do I still have to add in time dummy variables in the coding to account for seasonal time trend?
P.S I am a beginner and any help is appreciated. Please correct me if I am wrong

Thank you for your time.
Comment