Dear Statalist,

For my thesis I try to examine the effect when a firm generates more renewable energy on its cost of capital. In this I want to see what the difference in effects are in the period 2002-2010 and 2011-2018, and I have made interaction terms of my variable with a dummy that is 1 for period 1 (2002-2010) and a dummy that is 1 for period 2 (2011-2018). My question is regarding how I need to regress this, because I thought that I could do this in one model or in 2 where every time period is regressed separately, but the outcomes differ wildly. My supervisor told me the results should be the same but this isn't the case.

My sample consists of 140 firms and 17 years (2002-2018) and is unbalanced. I use Stata 15.1 MP.

The first method I tried was:
xtreg beta re_genperiod1 re_genperiod2 firmsizeperiod1 firmsizeperiod2, fe robust

The second method was:
xtreg beta re_genperiod1 firmsizeperiod1, fe robust
and:
xtreg beta re_genperiod2 firmsizeperiod2, fe robust

The third is:
xtreg betaperiod1 re_genperiod1 firmsizeperiod1, fe robust
and:
xtreg betaperiod2 re_genperiod2 firmsizeperiod2, fe robust

the outcomes differ widly from p-values of 0.00 to that of 0.413, etc.

Can someone explain why his is and which model is the correct one?

Thank you very much!

Julian