Hello. I have a question on how to adjust/ read the interaction plot in mixed model module.
There is an unexpected significant interaction in my data, and I want to know what it looks like. However, the resulting plot still looks like they are two parallel lines. How can I adjust the setting to generate a clearer interaction plot? Or is this the wrong way to probe the interaction?
I have attached the plot as well.
Thank you very much!
Interaction plot in mixed model
-
- Posts: 4
- Joined: Sun Feb 17, 2019 6:14 am
Interaction plot in mixed model
- Attachments
-
- DV2_int.png (7.26 KiB) Viewed 6894 times
Re: Interaction plot in mixed model
hi,
can you attach a .omv of the file?
cheers
jonathon
can you attach a .omv of the file?
cheers
jonathon
-
- Posts: 4
- Joined: Sun Feb 17, 2019 6:14 am
Re: Interaction plot in mixed model
Sorry I missed the file. Please see attached. Thank you!
- Attachments
-
- 232_DV2_int.omv
- (46.39 KiB) Downloaded 509 times
- mcfanda@gmail.com
- Posts: 462
- Joined: Thu Mar 23, 2017 9:24 pm
Re: Interaction plot in mixed model
HI Littleriver,
there are some issues here and a neat solution. First, If you compute the interaction yourself as a new variable (`agegp*SR`) you are forcing the model to be estimated with the independent variables with two different scales. One is the scale the software gives by default (centered continuous variables and centered coding for the categorical ones) and the other is the scale used to compute the interaction term (in your case, centered continuous and dummy for categorical). So the model is a hybrid and the results are inconsistent. If you want to have a consistent model (but please see later on a better solution) you should code your cat variable as dummy. But even by doing that, you would not get the plot you're expecting, because the software does not know how to condition the independent variables to compute the simple effects required for the plot.
The solution is to specify the interaction within the module. Simply go to "Fixed Effects", select both terms you want to interact and push the button to move the interaction term in the "Model Terms".
If you do that, you get the right estimates for the plots.
To be sure, I've checked the results with the proposed solution in GAMLj and SPSS, and they converge.
P.S: look up the new version 1.5.0 of GAMLj, with lots of improvements. The old .omv files may give an error with the new version. In case of error, please be sure all the options in the UI have a selected value, and everything will be fine.
there are some issues here and a neat solution. First, If you compute the interaction yourself as a new variable (`agegp*SR`) you are forcing the model to be estimated with the independent variables with two different scales. One is the scale the software gives by default (centered continuous variables and centered coding for the categorical ones) and the other is the scale used to compute the interaction term (in your case, centered continuous and dummy for categorical). So the model is a hybrid and the results are inconsistent. If you want to have a consistent model (but please see later on a better solution) you should code your cat variable as dummy. But even by doing that, you would not get the plot you're expecting, because the software does not know how to condition the independent variables to compute the simple effects required for the plot.
The solution is to specify the interaction within the module. Simply go to "Fixed Effects", select both terms you want to interact and push the button to move the interaction term in the "Model Terms".
If you do that, you get the right estimates for the plots.
To be sure, I've checked the results with the proposed solution in GAMLj and SPSS, and they converge.
P.S: look up the new version 1.5.0 of GAMLj, with lots of improvements. The old .omv files may give an error with the new version. In case of error, please be sure all the options in the UI have a selected value, and everything will be fine.
-
- Posts: 4
- Joined: Sun Feb 17, 2019 6:14 am
Re: Interaction plot in mixed model
Yes it works now! I should have known there's a much better way of testing the interaction.... Thank you so much for pointing out what's wrong for me, and thank you for replying me even on a Sunday!
- mcfanda@gmail.com
- Posts: 462
- Joined: Thu Mar 23, 2017 9:24 pm