Code | X(Treated or Controlled) | Time1 | Time2 | ||
M1 | Y1 | M2 | Y2 | ||
1 | 0 | ... | ... | ... | ... |
2 | 1 | ... | ... | ... | ... |
3 | 0 | ... | ... | ... | ... |
4 | 1 | ... | ... | ... | ... |
-
Login or Register
- Log in with
Code | X(Treated or Controlled) | Time1 | Time2 | ||
M1 | Y1 | M2 | Y2 | ||
1 | 0 | ... | ... | ... | ... |
2 | 1 | ... | ... | ... | ... |
3 | 0 | ... | ... | ... | ... |
4 | 1 | ... | ... | ... | ... |
regress y2 i.x##c.m1 y1 * Assuming that your mediator is a continuous variable with values ranging from 0-20 margins x, at(m1 = (0(4)20)) * A nice graph of the moderation effect marginsplot
Comment