First of all, thank you in advance for any answers to this post. It's very rare to have a forum like this with many serious people sharing knowledge and helping each other out

FIRST QUESTION:
I am doing a panel study in which my unit of analysis is a bank, and I follow their net interest margin (NIMQ, dependent variable) over years and quarters. My independent variable is the level of FED interest rate (shortterm), which I also include as a squared term in the model. Another independent variable is ycurve. All the other variables that you see below are controls. Furthermore, I also control for bank and year fixed effects, that is why I am using reghdfe. The regression model is as below:
Code:
reghdfe nimq shortterm c.shortterm#c.shortterm ycurve gdpqyoy housing stockmarket hhi laggedatq laggedleverage laggeddeprat laggedcostincrat crisis, a(gvkey qyear) vce(robust)
I tried by using margins and marginsplot, but it appears that it is not suited for this kind of regression. Does anyone have any suggestions on how I could plot the effect of a change in the independent variable on the dependent (dy/dx) at different levels of the independent variable?
SECOND QUESTION:
I expand this model by including the interaction effect of the independent shortterm with deposit ratio deprat and a "post financial crisis" dummy postcrisis. The dependent variable stays the same, and the model is as below:
Code:
reghdfe nimq shortterm ycurve deprat c.shortterm#c.deprat c.ycurve#c.deprat c.shortterm#postcrisis c.ycurve#postcrisis c.shortterm#c.deprat#postcrisis c.ycurve#c.deprat#postcrisis gdpqyoy housing stockmarket hhi laggedatq laggedleverage laggeddeprat laggedcostincrat crisis postcrisis, a(gvkey qyear) vce(robust)
As the interpretation of these results is quite cumbersome, I would like to plot the effect of shortterm on the dependent variable at different levels of deprat and with the postcrisis dummy at 0 and 1. If I am not mistaken, I would expect a graph along these lines: https://drive.google.com/file/d/1Xxe...ew?usp=sharing.
What do you suggest me to do, to have STATA generate a graph for these interactions? As they are complicated even for myself to interpret, I really hope that with your help I will figure this out.
I hope I've given enough information. In case I didn't, please tell me and I will provide anything ASAP.
Thank you again!
0 Response to Plotting non linearities in regression (as dy/dx) and interaction effects from reghdfe (multiple fixed effects)
Post a Comment