Dear Statalist,
I am currently working on an analysis of the effects of ESG ratings on stock returns. I am currently wanting to analyze if those effects differ for different industries.
I have two different versions of code that I am trying, one being an interaction effect and the other being an if option.
If I do this, I see that my output is significant, implying that the energy sector sees a different coefficient of ESG_Q than my general sample does.
However, when I perform this code:
I get a different answer. $h2 is the same as $h4en, except that $h2 does not have the interaction effect nor an industry variable in it.
Does anyone know what the reason for this is? My personal guess is that it is due to the fact that they do not operate in the same sample, but I am not sure of this. I am thinking this due to the fact that I limit my sample with if Energy == 1
I am currently working on an analysis of the effects of ESG ratings on stock returns. I am currently wanting to analyze if those effects differ for different industries.
I have two different versions of code that I am trying, one being an interaction effect and the other being an if option.
Code:
qui global h4en i.Energy##c.ESG_Q TAT_Q TAG_Q TA_Q EBIT_Q ROA_Q FL_Q BTM_Q reghdfe $ylist $h4en, absorb(n_ID Quarter) vce(cluster n_ID) test 1.Energy#c.ESG_Q = ESG_Q
However, when I perform this code:
Code:
reghdfe $ylist $h2 if Energy == 1, absorb(n_ID Quarter) vce(cluster n_ID)
Does anyone know what the reason for this is? My personal guess is that it is due to the fact that they do not operate in the same sample, but I am not sure of this. I am thinking this due to the fact that I limit my sample with if Energy == 1

Comment