Greetings. I have a longitudinal data set (set up in long form), and I am trying to graph a significant interaction of a time-varying predictor (ValueW, which is a continuous variable measured at 4 different time points) by a non-time varying predictor (female, a dichotomous measure of sex (male = 0, female = 1)). The outcome/dependent variable is a continuous measure of condom negotiation efficacy, also measured at the same 4 time points (cndngW).
The “mixed” command/syntax that I am using works fine, this is the command (relevant variables are bolded):
mixed cndngW c.valueW expecW i.female gpa clsmast clsext clsavd i.female##c.valueW || ID_STUDENT: year, cov(unstructured)
The output indicates that there is a significant interaction of female X valueW (p<.001).
I am trying to generate a graph to visualize this interaction. I usually use “margins” followed by “marginsplot,” but given that there is a time-varying predictor (valueW), I cannot get this to work. I am hoping that you can tell me how I can generate this graph (or some type of graph that will allow this to be visualized). So essentially I want to see how this interaction of a time-varying predictor (valueW) by a time-invariant dummy variable (female) predict a dependent variable measured at 4 time points (condngW).
Any insights would be greatly appreciated.
Related Posts with Graphing Interaction of Time-Varying Covariate and Dummy Variable in a Growth Curve Model using MIxed
Planting multiple regressionHey, I hope you all safe and well. I'm a new to STATA and doing multiple regression modeling using x…
Planting multiple regressionHey, I hope you all safe and well. I'm a new to STATA and doing multiple regression modeling using x…
Generate a new variable as the mean of individuals over timeI have the following data set, a panel dataset, (it is an example of what I have, the data set is mu…
difference-in-difference analysis with a random effects modelDear all, So far I learned that DiD is used with a Fixed effects model. But I just read a paper of …
Planting multiple regressionHey, I hope you all safe and well. I'm a new to STATA and doing multiple regression modeling using x…
Subscribe to:
Post Comments (Atom)
0 Response to Graphing Interaction of Time-Varying Covariate and Dummy Variable in a Growth Curve Model using MIxed
Post a Comment