In need of help with regression

Decomposing a regression coefficient - Desperate for help

I apologize in advance if this is a very stupid question but I cannot for the life of me figure out how to do this.

I want to regress the return of one asset onto another so as to obtain the correlation between the two, but I also want to decompose the coefficient into different parts so that I can see how that correlation is impacted by different sub-variables.

Im trying to replicate a regression made in an academic paper and their specification looks somewhat like this:

Ri,t = a + [B0 + B1*Dummy1 + B2*Dummy2] Rx,t

where im trying to find out the correlation between Ri and Rx but whilst being able to decompose the coefficient and see how much of the correlation is coming from Dummy1 and Dummy 2.

I have no clue how to set this up in STATA so please help if you can.

Last edited: