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
Saving svy: tab results to Excel with putexcelHi Statalisters, I’m trying to pull cross-tabulated percentages (estimated with svy: tab) out of St…
Splitting string in two numeric variablesHello! My data set includes a variable called price that is recorded as an interval (in most cases):…
Randomized Inference for Panel Data-ritest- is a easy way to do Randomized Inference (thanks Simon HeB), but I'm not certain it works t…
Program + ForeachHi there, I am a new user here in this forum, so this is my first thread. My question: I am trying…
Deleting rows with the same valuesDear Statalists, In my dataset i have rows with same value, more precisely "NA" therefore i want to …
Subscribe to:
Post Comments (Atom)
0 Response to Interaction Term Graphs for Quadratic Terms
Post a Comment