Hello everyone. I would appreciate some help with the margins command. I am running a model like this
and it later becomes like this
. The aim is to examine how retail deposits and excess liquidity affect loan ratio after the implementation of negative interest rates.
where Loan_ratio is the dependent continuous variable
RD_ratio_lagged and EL_ratio_lagged are both continuous variable
NIRP is a dummy that is 0 before 02/2015 and afterwards becomes 1 that indicates the periods of positive and negative interest rates
high_EL_ratio is a dummy for categorizing banks into two groups
I know that if i want to measure the effect of my independent variables i have to use margins since they are part of the interaction terms.
Firstly, i am not sure if there is a correct margins command, because i know there are various ways to use it. What i come across the most is
. However i get some problems when i use this setup.
and if i switch the variables i get
However, when i ran
i got these results:
Any insights about how i should go on would be really helpful
Code:
xtreg Loan_ratio Loan_ratio_lagged c.RD_ratio_lagged##i.NIRP i.months, fe robust
Code:
xtreg Loan_ratio Loan_ratio_lagged c.EL_ratio_lagged##NIRP##c.RD_ratio_lagged##high_E L_ratio i.months, fe robust
where Loan_ratio is the dependent continuous variable
RD_ratio_lagged and EL_ratio_lagged are both continuous variable
NIRP is a dummy that is 0 before 02/2015 and afterwards becomes 1 that indicates the periods of positive and negative interest rates
high_EL_ratio is a dummy for categorizing banks into two groups
I know that if i want to measure the effect of my independent variables i have to use margins since they are part of the interaction terms.
Firstly, i am not sure if there is a correct margins command, because i know there are various ways to use it. What i come across the most is
margins var, dydx(var)
Code:
. xtreg Loan_ratio Loan_ratio_lagged c.RD_ratio_lagged##i.NIRP i.months, fe robust note: 239.months omitted because of collinearity. Fixed-effects (within) regression Number of obs = 1,120 Group variable: bankid Number of groups = 34 R-squared: Obs per group: Within = 0.7712 min = 12 Between = 0.9923 avg = 32.9 Overall = 0.9765 max = 35 F(33,33) = . corr(u_i, Xb) = 0.8156 Prob > F = . (Std. err. adjusted for 34 clusters in bankid) Robust Loan_ratio Coefficient std. err. t P>t [95% conf. interval] Loan_ratio_lagged .8627486 .0334491 25.79 0.000 .7946958 .9308014 RD_ratio_lagged -.0560122 .0219111 -2.56 0.015 -.1005907 -.0114337 1.NIRP .0103484 .006633 1.56 0.128 -.0031466 .0238434 NIRP#c.RD_ratio_lagged 1 -.003761 .0054517 -0.69 0.495 -.0148525 .0073306
Code:
margins NIRP, dydx(RD_ratio_lagged) Average marginal effects Number of obs = 1,120 Model VCE: Robust Expression: Linear prediction, predict() dy/dx wrt: RD_ratio_lagged --------------------------------------------------------------------------------- | Delta-method | dy/dx std. err. z P>|z| [95% conf. interval] ----------------+---------------------------------------------------------------- RD_ratio_lagged | NIRP | 0 | . (not estimable) 1 | . (not estimable) ---------------------------------------------------------------------------------
and if i switch the variables i get
Code:
margins RD_ratio_lagged, dydx(NIRP) RD_ratio_lagged: factor variables may not contain noninteger values r(452); end of do-file r(452);
However, when i ran
margins, dydx(*)
Code:
. margins, dydx(*) Average marginal effects Number of obs = 1,120 Model VCE: Robust Expression: Linear prediction, predict() dy/dx wrt: Loan_ratio_lagged RD_ratio_lagged 1.NIRP 206.months 207.months 208.months 209.months 210.months 211.months 212.months 213.months 214.months 215.months 216.months 217.months 218.months 219.months 220.months 221.months 222.months 223.months 224.months 225.months 226.months 227.months 228.months 229.months 230.months 231.months 232.months 233.months 234.months 235.months 236.months 237.months 238.months 239.months ----------------------------------------------------------------------------------- | Delta-method | dy/dx std. err. z P>|z| [95% conf. interval] ------------------+---------------------------------------------------------------- Loan_ratio_lagged | .8627486 .0334491 25.79 0.000 .7971895 .9283077 RD_ratio_lagged | -.058111 .0225589 -2.58 0.010 -.1023257 -.0138963 1.NIRP | . (not estimable)
Any insights about how i should go on would be really helpful
Comment