Interaction plot in mixed model

Discuss statistics related things
Post Reply
littleriver
Posts: 4
Joined: Sun Feb 17, 2019 6:14 am

Interaction plot in mixed model

Post by littleriver »

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!
Attachments
DV2_int.png
DV2_int.png (7.26 KiB) Viewed 6573 times
User avatar
jonathon
Posts: 2613
Joined: Fri Jan 27, 2017 10:04 am

Re: Interaction plot in mixed model

Post by jonathon »

hi,

can you attach a .omv of the file?

cheers

jonathon
littleriver
Posts: 4
Joined: Sun Feb 17, 2019 6:14 am

Re: Interaction plot in mixed model

Post by littleriver »

Sorry I missed the file. Please see attached. Thank you!
Attachments
232_DV2_int.omv
(46.39 KiB) Downloaded 454 times
User avatar
mcfanda@gmail.com
Posts: 457
Joined: Thu Mar 23, 2017 9:24 pm

Re: Interaction plot in mixed model

Post by mcfanda@gmail.com »

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".

Image

If you do that, you get the right estimates for the plots.

Image

To be sure, I've checked the results with the proposed solution in GAMLj and SPSS, and they converge.

Image
Image

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.
littleriver
Posts: 4
Joined: Sun Feb 17, 2019 6:14 am

Re: Interaction plot in mixed model

Post by littleriver »

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!
User avatar
mcfanda@gmail.com
Posts: 457
Joined: Thu Mar 23, 2017 9:24 pm

Re: Interaction plot in mixed model

Post by mcfanda@gmail.com »

:-)
Post Reply