Dear Statalist community,
I am puzzled as two command that should be equivalent are not, and I cannot explain myself the reason.
I am analyzing panel data, defined with id (firms - 3500 firms) and year (time - 16 years).
I tried using the classical xtreg with fixed effects and then also reghdfe in the code written below. I use them with the same dependent, independent and covariates (which i denote with "covariates" in this particular code) variables.
The dv is a continuous variable, the iv is a binary variable (a treatment) and some covariates are continuous and some are binary.
The codes that I have written are:
I expect exactly same results both coefficient and standard errors are different between the two outcomes.
Is anybody aware of what I am missing?
Thank you very much in advance for you help,
and I apologize in advance if I haven't met some rules.
Alberto
I am puzzled as two command that should be equivalent are not, and I cannot explain myself the reason.
I am analyzing panel data, defined with id (firms - 3500 firms) and year (time - 16 years).
I tried using the classical xtreg with fixed effects and then also reghdfe in the code written below. I use them with the same dependent, independent and covariates (which i denote with "covariates" in this particular code) variables.
The dv is a continuous variable, the iv is a binary variable (a treatment) and some covariates are continuous and some are binary.
The codes that I have written are:
Code:
reghdfe dv iv covariates, absorb(industry year id) vce(robust)
Code:
xtset id year xtreg dv iv covariates i.year i.industry ,fe vce(robust)
Is anybody aware of what I am missing?
Thank you very much in advance for you help,
and I apologize in advance if I haven't met some rules.
Alberto
Comment