Hi All,
I have the following regression equation. I am trying to see the interaction effect of a binary variable (gender) on both my linear term (counter) and quadratic terms (counter_sq)
reg Y x1 x2 x3 c.counter##i.gender c.counter_sq##i.gender i.month, robust
I have used the following command
margins, at(counter =(-4958 0 4958) gender=(0 1))
marginsplot, noci x(counter)
1. When I run the following code with both the square term and moderator (i.e. c.counter_sq##i.gender) and the linear term and moderator (c.counter##i.gender) I don't see a variation in the graph with the gender. However, when I remove the quadratic term and the interaction (c.counter_sq##i.gender) and used only the linear term and moderator (c.counter##i.gender) then it worked.
2. Further, when I try to only see the effect of quadratic term and the interaction (c.counter_sq##i.gender) I don't see any variation of gender (i.e. I see one line and not two lines for both values of 0 and 1 for gender).
margins, at(counter_sq =(-4958 0 4958) gender=(0 1))
marginsplot, noci x(counter_sq)
Please suggest how to proceed.
My intention is to interpret the results of the interaction term and linear and quadratic term. Apart from the coefficients I also intend to see it in a graph.
Related Posts with Interaction Term Graphs for Quadratic Terms
standard error double lasso with clusteringHi, I am using the new cluster feature for LASSO in stata and I am a little confused by the way the…
opreg with IfHi Profs and Colleagues, I wonder if there is any difference between these two codes #1 & #2. I…
Interpreting triple interaction term with continuous variableDear stata community, I am struggling with the interpretation of Treated x Post x Log(1+Z) with Z b…
Dynamic Panel Model for Large T and Small N.Hello Everyone, I am working on a problem in which I am assessing the risk of credit default in rel…
Difference in difference Post and Treatment dummiesI want to apply a difference in difference estimations to observe differences in the dependent varia…
Subscribe to:
Post Comments (Atom)
0 Response to Interaction Term Graphs for Quadratic Terms
Post a Comment