Dear Stata experts,
I'm trying to test several GLM models. I have two independent variables (X and Y). X is binary and Y is continuous. The dependent variable (Z) is binary. I also have two moderators (M and N).
According to my understanding, if I only have one independent variable (X), the models are like this:
Model 1 (Empty model): Z = M + N + control variables
Model 2 (Main effect): Z = X + M + N + control variables
Model 3 (Moderating effect M): Z = X + X*M + control variables
Model 4 (Moderating effect N): Z = X + X*N + control variables
Model 5 (Full model): Z = X + X*M + X*N + control variables
Now since I have two IVs X and Y, and I want to test the moderating effects of M and N on both X and Y. How should I add Y, Y*M, and Y*N in the models? Should I just repeat Model 1 through Model 5 by replacing X with Y? Or should I put X and Y together in the five models?
Thank you very much for helping!
Related Posts with How to fit GLM models with two independent variables and two moderators?
Dynamic Panel Data xtpdsys/xtabondHi, I would like to make the same dynamic panel data analysis, as in this article: https://www.tand…
Dummy for a Criminal to commit a crime again in futureHello everyone, Need help with this. I need to see if a person will commit a crime again after his c…
Issues with Parallel Computing and xtregHi, I am trying to run panel regressions using the package parallel that allows for parallel computi…
Alternative to rowjoinbynameIs rowjoinbyname a more recent command? In the desktop Stata version 16 the code below works, in the…
Generating Probabilities from RangeHi everyone, I have question regarding how to calculate probabilities from data. My idea is to crea…
Subscribe to:
Post Comments (Atom)
0 Response to How to fit GLM models with two independent variables and two moderators?
Post a Comment