Dear all,
I would like to investigate the the relationship between to variables. Y is my dependent variable, A and B are independent.
I guess the effect of the variable B is not linear. I use a panel dataset, my final version is a fixed effects estimation.
My Problem:
I used the very good command "mkspline2" . I think the problem is I can´t use the post estimation plot "mfxrcspline" with interaction terms.
My Aim:
Estimate something like this:
and a marginal plot or (at least) a predicted value plot, that shows the effect of B (for different values of A) on Y.
Got anybody an idea? Thanks your help
Best regards
I would like to investigate the the relationship between to variables. Y is my dependent variable, A and B are independent.
I guess the effect of the variable B is not linear. I use a panel dataset, my final version is a fixed effects estimation.
My Problem:
I used the very good command "mkspline2" . I think the problem is I can´t use the post estimation plot "mfxrcspline" with interaction terms.
My Aim:
Estimate something like this:
Code:
mkspline2 spline_B = B, cubic nknots(3) gen spline_interact1 = spline_B1*A gen spline_interact2 = spline_B2*A xtreg Y A spline_B* spline_interact* ,fe
Got anybody an idea? Thanks your help
Best regards
Comment