Hi, so I am going to perform a fama macbeth two path regression.
The regressions that I am going to perform looks like this:
Book leverage = x1 x2 x3 x4 x5
I am running this regression on 900 firms.
But as the second step is to regress each firmyear observation on the beta coeefecients, I would need to save the 5 beta values above in 5 different variables (b1, b2, b3, b4, b5).
The second regression will then look something like this:
Book leverage = b1 b2 b3 b4 b5
In this case I will receive a new beta value for regressing upon each beta value, we can call these values gamma instead (g1, g2, g3, g4, g5).
I then need to save these five gammas to be able to perform further analysis upon them.
I have done the following so far:
levelsof id, local(tempid) //Saving the unique id's in a local file to be used as identifier for the looped regressions
foreach i in `tempid' {
regress b_lev x1 x x3 x4 x5
}
What I need help with is to find out how I am able to store each beta value in new variables. And please explain your code.
Thank you in Advance
Best regards, Morten
The regressions that I am going to perform looks like this:
Book leverage = x1 x2 x3 x4 x5
I am running this regression on 900 firms.
But as the second step is to regress each firmyear observation on the beta coeefecients, I would need to save the 5 beta values above in 5 different variables (b1, b2, b3, b4, b5).
The second regression will then look something like this:
Book leverage = b1 b2 b3 b4 b5
In this case I will receive a new beta value for regressing upon each beta value, we can call these values gamma instead (g1, g2, g3, g4, g5).
I then need to save these five gammas to be able to perform further analysis upon them.
I have done the following so far:
levelsof id, local(tempid) //Saving the unique id's in a local file to be used as identifier for the looped regressions
foreach i in `tempid' {
regress b_lev x1 x x3 x4 x5
}
What I need help with is to find out how I am able to store each beta value in new variables. And please explain your code.
Thank you in Advance
Best regards, Morten
Comment