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
Scaling DataHi all,
I am working on some survey data, one question is based on proportions. I therefore have 5 v…
Making household-level variables using individual-level variablesHello. I have a data set that has the following structure.
hhcode member_id age
1 1 45
1 2 23
1 3 3…
What is the full name of the GSPRE model in the spatial econometric models?The xsmle command can perform the following spatial econometric model analysis:
i.e. SAR, SDM, SAC, …
Error message - 'equation [kappa] not found r(303) - when choosing parametric model in StataHello all,
I am having trouble with a command in Stata and was wondering if anybody could shed some…
Append and recode multiple datasets at onceHi,
I am fairly new to stata and am trying to figure out a way where I can recode variables across m…
Subscribe to:
Post Comments (Atom)
0 Response to Interaction Term Graphs for Quadratic Terms
Post a Comment