Hi,
I have two variables X and Z that are hypothesized to influence Y. The effect of X on Y is nonlinear, that is, X squared is also significant. So we have:
Y = B0 + B 1X + B 2X2 + B 3Z
The code in stata (a mixed model regression is as follows): mixed Y c.X##c.X Z
Now if I want to estimate how the interaction effect of X and Z are, that is, how does Z moderate the impact of X on Y, which of the following codes are correct:
1. mixed Y c.X##c.X c.X##c.Z
2. mixed Y c.X##c.X##c.Z
In other words, should I interact Z with X, or should I interact it with X#X again?
As usual, I tag dear Clyde since his comments have always been helpful for me.
I have two variables X and Z that are hypothesized to influence Y. The effect of X on Y is nonlinear, that is, X squared is also significant. So we have:
Y = B0 + B 1X + B 2X2 + B 3Z
The code in stata (a mixed model regression is as follows): mixed Y c.X##c.X Z
Now if I want to estimate how the interaction effect of X and Z are, that is, how does Z moderate the impact of X on Y, which of the following codes are correct:
1. mixed Y c.X##c.X c.X##c.Z
2. mixed Y c.X##c.X##c.Z
In other words, should I interact Z with X, or should I interact it with X#X again?
As usual, I tag dear Clyde since his comments have always been helpful for me.
Comment